Use case 04 of 21 · By Nicolas Dao

A traffic spike I can see coming

A flash sale, ticket drop or launch where thousands hit at once.

My stack for this

  1. 01
    Cloudflare Workers

    The shock absorber. Workers start in milliseconds at any traffic, with no ramp-up and no concurrency quota, so 0 to 5,000 requests a second just works. Lambda scales fast but in steps: at most 1,000 new instances per 10 seconds per function, capped by the account default of 1,000, each one cold-starting. Junk is rejected at the edge.

  2. 02
    Cloudflare Durable Objects

    Exact stock counters. Instant "you got one" or "sold out", no overselling.

  3. 03
    AWS Lambda

    Calm checkout for the winners only. Behind the Worker and the counters, Lambda sees the 2,000 winners, not 50,000 people in ten seconds.

  4. 04
    Stripe

    Payment.

Don't

  • Lambda function URLs

    Not as the front door for the crowd. Function URLs are still my default for normal APIs, and Lambda still does the checkout above. The problem is pointing 50,000 people straight at it: the spike hits Lambda's scaling steps and 1,000-instance default, gets 429s, and every new instance opens a database connection at once. Put the Worker in front and only the winners reach Lambda.

    Instead: Cloudflare Workers

Worked example: The flash sale →

The picks, in brief

What each one is, my verdict, and what it costs. Every name opens the full entry: when to use it and when not, the gotchas with their fixes, provisioning and alternatives.

  • The edge primitive. It sits between your users and your real backend, and it's very, very good at that.

    Pricing: $5 a month per account, including 10M requests and 30M CPU-ms. Then $0.30 per million requests and $0.02 per million CPU-ms. Billed on CPU time only: waiting is free. No egress charges.

  • A tiny server with its own SQLite database, addressed by name. One referee for everyone connected to the same thing. Unbeatable for live, shared, short-lived state.

    Pricing: On Workers Paid: 1M requests included, then $0.15 per million. Duration: 400,000 GB-s included, then $12.50 per million GB-s (always billed at 128 MB, not billed while hibernating). Incoming WebSocket messages count 20:1; outgoing messages are free. Rows written: 50M included, then $1 per million. Storage: 5 GB included, then $0.20/GB-month.

  • My default AWS Lambda

    My default for event-driven work and heavy compute. Classic Lambda, zip-packaged, Node.js.

    Pricing: $0.20 per million requests + $0.0000133334/GB-s on Arm ($0.0000166667 on x86). Free tier: 1M requests and 400,000 GB-s a month, always.

  • My default Stripe

    Payments, mine and my clients'.

    Pricing: Australian cards: 1.65% + A$0.30 domestic, 3.5% + A$0.30 international, plus 2% when currency conversion applies. No setup or monthly fee. Disputes A$25 each. Billing (subscriptions) adds 0.7% of billing volume on pay-as-you-go; Managed Payments (Stripe as merchant of record) adds 3.5% per transaction.

Where they sit

The layers of the stack this job touches, with every tool named on this page.

Want this stack in your AWS account?

Cloudless Labs is a Sydney consultancy. We migrate on-premises systems to AWS, build serverless apps on this stack, and coach teams to ship with Claude Code and Codex.

Contact Us

For general inquiries, please contact us at:

For e-learning capabilities, please contact: