What it costs to run Dub

At 10,000 monthly users, Dub would cost about $187 a month in infrastructure, priced as the AWS equivalent, plus $36.50–$730 a month in AI model tokens depending on the model. Skeram forecast this from its code at commit 6e7eb28, read 2026-07-07, with token prices as of 2026-11-12. What breaks first: 8 background jobs run inline in request handlers.

Skeram

Dub

github.com/dubinc/dub at 6e7eb28High-traffic read path48 routes, nextRead 2026-07-07Download the model (JSON)

What to fix firstat 10,000 users, ranked by severity and evidence

CriticalCode fix · bites at 10K users

Cache warm + partner enrollment lookup via waitUntil in link redirect handler; Send password-reset confirmation email post-response; Increment workspace aiUsage counter post-response (+5 more). Work fired from a handler without a queue dies with the process on deploys and crashes, fails silently with no retry, and competes with requests for the same instance.

Fix: Move to a queue (SQS + a worker service, as in the architecture shown, sized for this load). The handler has to be rewritten to publish to it instead of firing inline.

WarningCode fix · bites at 100K users

stripe, resend (@dub/email), google/github oauth (next-auth), cloudflare-r2, unsplash… sit in the request path. Any of their p99 spikes becomes your p99 spike; without timeouts and retries with backoff, their outage is your outage.

Fix: Set explicit timeouts on every client, add circuit breaking, and move non-interactive calls (email, analytics) to the worker.

WarningInfra fix · bites at 100K users

Deployed on vercel — every concurrent function instance owns its own pool. ~2 concurrent instances at 10,000 users × pool size quickly exceeds max_connections, even though the code "uses pooling".

Fix: Put PgBouncer/RDS Proxy in front, or move steady traffic onto long-lived containers (the Fargate architecture shown here).

1 critical

Per active user, per month
$0.022–$0.092
LLM $0.0037–$0.073 (cheap to frontier model) + infrastructure $0.019
$0.00060–$0.012 per chat message (/api/ai/completion)
LLM tokens per month
$36.50$730cheap modelfrontier model
AWS per month
$187
Recommended architecture, us-east-1

Assumptions

Dub: the bill at each scale

Monthly usersInfrastructureAI model tokensCritical findings
100$110/mo$0.36–$7.30/monone
1,000$132/mo$3.65–$73.00/monone
10,000$187/mo$36.50–$730/mo8 background jobs run inline in request handlers
100,000$745/mo$365–$7,300/mo8 background jobs run inline in request handlers; Connection pools on serverless multiply per function instance; 4 webhooks process synchronously; 10 third-party APIs are called inline with requests

Forecast by Skeram from the repository at commit 6e7eb28, analysed 2026-07-07. Infrastructure is priced as the AWS equivalent at AWS list prices, whatever the app deploys to. Token prices from the dated snapshot shown in the report above.

Want one of an app you use? Request a teardown, or see all teardowns.

Questions

How much does it cost to run Dub at 1,000 users?

About $132 a month in infrastructure, priced as the AWS equivalent plus $3.65–$73.00 in AI model tokens at 1,000 monthly users, by Skeram's forecast from the code at commit 6e7eb28.

How much does it cost to run Dub at 10,000 users?

About $187 a month in infrastructure, priced as the AWS equivalent plus $36.50–$730 in AI model tokens at 10,000 monthly users, by Skeram's forecast from the code at commit 6e7eb28. What breaks first: 8 background jobs run inline in request handlers.

How much does it cost to run Dub at 100,000 users?

About $745 a month in infrastructure, priced as the AWS equivalent plus $365–$7,300 in AI model tokens at 100,000 monthly users, by Skeram's forecast from the code at commit 6e7eb28. What breaks first: 8 background jobs run inline in request handlers; connection pools on serverless multiply per function instance; 4 webhooks process synchronously; 10 third-party apis are called inline with requests.