# A traffic spike I can see coming

> A flash sale, ticket drop or launch where thousands hit at once. Nicolas Dao's picks for this job (Cloudless Labs, Sydney), in order of preference, what he would avoid, and what to use instead.

- Use case 4 of 21 in The Stack, last reviewed 21 October 2026
- Web page: https://cloudlesslabs.com/stack/use-cases/flash-sale/

Picks, in order of preference:

1. **[Cloudflare Workers](https://cloudlesslabs.com/stack/cloudflare-workers/index.md)** (My default): 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. **[Cloudflare Durable Objects](https://cloudlesslabs.com/stack/cloudflare-durable-objects/index.md)** (Use when it fits): Exact stock counters. Instant "you got one" or "sold out", no overselling.
3. **[AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md)** (My default): 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. **[Stripe](https://cloudlesslabs.com/stack/stripe/index.md)** (My default): 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](https://cloudlesslabs.com/stack/cloudflare-workers/index.md).

Worked example: [The flash sale](https://cloudlesslabs.com/stack/guides/flash-sale/index.md)

## The picks in brief

- [Cloudflare Workers](https://cloudlesslabs.com/stack/cloudflare-workers/index.md): My default. 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.
- [Cloudflare Durable Objects](https://cloudlesslabs.com/stack/cloudflare-durable-objects/index.md): Use when it fits. 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.
- [AWS Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md): My default. 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.
- [Stripe](https://cloudlesslabs.com/stack/stripe/index.md): My default. 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.

## Related

- [The flash sale](https://cloudlesslabs.com/stack/guides/flash-sale/index.md): the worked example for this job, with costs
- [Edge](https://cloudlesslabs.com/stack/layers/edge/index.md): every tool in this layer
- [Compute](https://cloudlesslabs.com/stack/layers/compute/index.md): every tool in this layer
- [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events/index.md): every tool in this layer
- [Business tools](https://cloudlesslabs.com/stack/layers/business/index.md): every tool in this layer
- [Every use case and tool in one file](https://cloudlesslabs.com/stack/brief.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
