Question about scaling vs supabase edge functions

remusrisHOBBY

3 days ago

For some reason this supabase edge function is creating a bug that I can't explain so I made a route on a bun server and deployed it via railway and it seem to work splendidly. Anyways, supabase edge functions are about 2$ per 1 million invocations. This request is taking under 500ms typically, my question is can railway via pro (20$ a month) handle millions of requests a month on a bun power elysia server?

$10 Bounty

5 Replies

remusrisHOBBY

3 days ago

N/A


3 days ago

Yeah. Sure. Railway hosts many large scale applications.

It will handle as much as your server can.

Regarding pricing, it just depends on the actual size of the requests being made.


3 days ago

Railway bills for uptime, not per hit. One always-on Pro container ($20/mo) gives you the full 720 hours. If your handler averages 0.5 s and the CPU can juggle 20 concurrent requests (pretty normal for Bun), that is ~40 req/s --->100 M+ hits a month before you need a second container. So “millions” is easy; cost only rises if you scale out or bump the container size.

There are several caveats that might make your final bill look bigger or smaller compared to supabase, though: memory, cpu, volume, backups, egress, etc. You can still turn on the serverless mode which should decrease the usage, but still, the best way is to run small tests and run sims if you have the time and resources for both now.


3 days ago

It doesn't bill for uptime, it bills for usage. Those are very different things.


loudbook

It doesn't bill for uptime, it bills for usage. Those are very different things.

3 days ago

Not exactly. Each project and its containing services do have minimum expected bills for an always-on deploy. And since this is connected to volumes, backups etc, even with low traffic this might become progressively more expensive over time.


3 days ago

Each of them...? Your account has a minimum bill which covers all your projects and services.


Question about scaling vs supabase edge functions - Railway Help Station