| Serverless functions | Server or container | Queue worker |
|---|
| Cost when idle | Close to zero: you pay per use. | Same as at peak: it’s always on. | The running process plus the queue service. |
|---|
| Long-running work | Each invocation has a time limit; long work is split into steps. | No practical limit while the server is up. | Built for it: processes jobs outside the user’s request. |
|---|
| Real time | Not designed for open connections; hand it off to a service like Supabase Realtime. | Your own WebSockets, no middleman. | Not applicable: it works in the background. |
|---|
| What you maintain | The code and its dependencies; the platform scales for you. | Plus the OS, patches, restarts and scaling. | Plus the queue, retries and stuck jobs. |
|---|
| When to choose it | APIs, integrations and cron jobs with spiky traffic. | Persistent connections or your company’s infrastructure requirements. | High volumes of heavy jobs: imports, bulk email, file processing. |
|---|
Serverless functions
- Cost when idle
- Close to zero: you pay per use.
- Long-running work
- Each invocation has a time limit; long work is split into steps.
- Real time
- Not designed for open connections; hand it off to a service like Supabase Realtime.
- What you maintain
- The code and its dependencies; the platform scales for you.
- When to choose it
- APIs, integrations and cron jobs with spiky traffic.
Server or container
- Cost when idle
- Same as at peak: it’s always on.
- Long-running work
- No practical limit while the server is up.
- Real time
- Your own WebSockets, no middleman.
- What you maintain
- Plus the OS, patches, restarts and scaling.
- When to choose it
- Persistent connections or your company’s infrastructure requirements.
Queue worker
- Cost when idle
- The running process plus the queue service.
- Long-running work
- Built for it: processes jobs outside the user’s request.
- Real time
- Not applicable: it works in the background.
- What you maintain
- Plus the queue, retries and stuck jobs.
- When to choose it
- High volumes of heavy jobs: imports, bulk email, file processing.
General comparison as of October 2026. Our own products run on serverless functions on Vercel, and one project can combine all three.