# The Retry Storm – senior-level system design challenge

Source: https://systemdesignsim.com/challenges/retry-storm

Your database is about to slow down by 400 ms. Your clients retry failures up to three times. Keep the API standing.

## Requirements

* Traffic: 3,000 req/s
* Clients: retry up to 3 times, 1 s timeout
* p99 latency: ≤ 1 s
* Errors: ≤ 0.5%
* Must survive: the database slowing down by 400 ms

## Goal

Hold p99 latency under 1,000ms, error rate under 0.5% through every stage of the test plan, then compare your design with a reference design.

## The test plan

1. Normal: 3,000 requests per second.
2. Database slows down: 3,000 requests per second.

## Hint

A slow database doesn't use API CPU - it holds API threads while requests wait. Once threads run out, requests fail, clients retry, and the retries add even more load. Stop requests waiting on the database: a cache answers most of them without touching it.

Solve it on the live simulator, free and in your browser.

## Reference design

[The Retry Storm](https://systemdesignsim.com/blueprints/retry-storm-resilience): Keep read requests off a slow database.

## Interview prep

[What senior and SDE-3 system design rounds test](https://systemdesignsim.com/interview/senior-system-design)

## More system design challenges

* [Hello, Load Balancer](https://systemdesignsim.com/challenges/hello-load-balancer) - One API server is drowning under 1,500 RPS. Bring p99 latency to 500 ms or less and keep errors at 0.5% or less without touching the traffic.
* [Cache Money](https://systemdesignsim.com/challenges/cache-money) - Your database is at 95% utilization serving reads it has answered a thousand times. Cool it down below 50%.
* [Design a URL Shortener](https://systemdesignsim.com/challenges/url-shortener) - Redirect traffic grows from 1,000 to 20,000 requests per second. Keep every redirect fast through a cache restart and a server failure at peak, within budget.
* [Checkout failures on sale morning](https://systemdesignsim.com/challenges/sale-morning-checkout) - An on-call drill. Checkouts started failing minutes after a sale opened. Find the part that is failing, fix it with settings only, then answer one question about the fix.
* [The Stampede](https://systemdesignsim.com/challenges/the-stampede) - Your cache will be flushed mid-run. Survive the stampede - keep errors under 5% while it refills.
* [Queue It Up](https://systemdesignsim.com/challenges/queue-it-up) - Write traffic spikes 5× partway through. Absorb the burst without dropping a single write.
* [Stop the Scraper Flood](https://systemdesignsim.com/challenges/rate-limiter) - A scraper is about to hit your public API with 10× normal traffic. Keep real users' requests fast while the flood lasts, and be healthy again the moment it stops.
* [Design a Chat System](https://systemdesignsim.com/challenges/chat-system) - Messages and history reads grow to 10,000 a second, then New Year's midnight triples it. Keep sends fast and every message delivered within 10 seconds, within budget.
* [Design a Notification System](https://systemdesignsim.com/challenges/notification-system) - Your app sends push notifications through a provider that accepts 2,000 a second. Breaking news is about to multiply events 20×. Deliver every notification within a minute without the provider rejecting any.
* [Design a News Feed](https://systemdesignsim.com/challenges/news-feed) - Timeline reads and new posts grow to 30,000 requests a second at peak. Keep timelines fast, get every post into followers' feeds and search within 10 seconds, within budget.
* [Design a RAG Pipeline](https://systemdesignsim.com/challenges/rag-pipeline) - Your support assistant answers questions from the company's documents with an LLM. Usage grows from 5 to 30 questions a second. Keep answers grounded, under 4 seconds, and inside a $70,000 monthly model bill.
* [Design a RAG Ingestion Pipeline](https://systemdesignsim.com/challenges/rag-ingestion) - An enterprise customer uploads 10,000 PDFs at once. Each one is parsed, split into chunks of about 300 tokens, embedded with Titan Text Embeddings V2 and written to a vector database. Bedrock throttles embedding models by requests a minute, and your quota for this one is 6,000, which AWS won't raise. Get every chunk embedded without losing any, and keep uploads fast.
* [Design IRCTC Tatkal Booking](https://systemdesignsim.com/challenges/irctc-tatkal) - At exactly 10:00 Tatkal booking opens and traffic jumps tenfold in a second. Keep the site up, accept every booking attempt, and confirm each one within a minute, within budget.
* [Hotstar: The Wicket Spike](https://systemdesignsim.com/challenges/hotstar-ipl) - It's the IPL final. Video comes from the CDN, but every app also calls your home-screen and scorecard API. When a big wicket falls, millions of viewers press back at once. Survive the toss and the wicket without a single wave of errors.
* [Design Food Delivery (Swiggy, Zomato)](https://systemdesignsim.com/challenges/food-delivery) - Customers browse menus and order; riders send their location every few seconds. Traffic climbs to 30,000 requests a second on New Year's Eve. Keep menus fast and every rider on the map within 10 seconds, within budget.
* [Design the Flipkart Big Billion Days Sale](https://systemdesignsim.com/challenges/flipkart-bbd) - At noon a phone goes on sale at a price nobody can resist, and half of all traffic is for that one product. Keep product pages up and take orders without overselling, within budget.
* [Design UPI Payments](https://systemdesignsim.com/challenges/upi-payments) - A UPI app on salary day: payments go through NPCI to the banks, which answer in about a second, and sometimes much slower. When they slow down, phones time out and retry. Make sure no one is debited twice.
* [Design a Flight Search Aggregator](https://systemdesignsim.com/challenges/flight-search) - Travellers search for flights and your service asks the airlines' partner APIs for fares, then returns the best options. A holiday sale pushes searches to 3,000 a second, and later the airline APIs slow down. Keep search fast, stay inside the airlines' rate limit, and keep the bill within budget.
* [Design a Distributed Job Scheduler](https://systemdesignsim.com/challenges/job-scheduler) - Teams submit jobs through an API and poll for their status, and recurring jobs fire on a timer. Each job calls the system it acts on and waits about a second for it to finish. At month end, team traffic jumps to six times a normal hour, and then the target systems slow to two seconds a job. Every job must start within 10 seconds of being submitted or falling due, and none may be lost, within budget.
* [Design a Tagging and Search System](https://systemdesignsim.com/challenges/tag-search) - People tag pages and issues across a large workspace product, and find work by searching for a tag. Tags are saved in a database and copied into a search cluster. On Monday morning traffic is six times a quiet day, and later one search node dies. Keep tag searches fast, make new tags searchable within 5 seconds, and stay within budget.
* [Design YouTube Uploads](https://systemdesignsim.com/challenges/youtube-uploads) - Creators upload video in 16 MB chunks while viewers load video pages. Uploads grow fourfold on a festival evening. Keep pages fast and uploads flowing, within budget.
* [Design an Ad Click Aggregator](https://systemdesignsim.com/challenges/ad-click-aggregator) - Every ad click is logged so advertisers can see clicks per ad per minute and be billed for them. Clicks climb to 12,000 a second during a big sale, while advertisers keep refreshing their dashboards. Count every click and keep dashboards fast, within budget.
* [Handle a Webhook Spike with Lambda](https://systemdesignsim.com/challenges/webhook-spike) - Your payment provider sends a webhook for every payment, and a Lambda function copies each one into your CRM. The CRM takes about a second to answer and accepts 500 calls a second. A flash sale is about to send 2,500 webhooks a second. Get every payment into the CRM within a minute, without dropping any.
* [Design Dropbox Sync](https://systemdesignsim.com/challenges/dropbox-sync) - Every device a user signs in on keeps a folder in sync. Devices ask the server for changes every 10 seconds, upload changed files in 4 MB blocks, and list and edit files. On Monday at 9 am, 240,000 devices are online. Keep sync fast and every upload safe, within budget.
* [Black Friday](https://systemdesignsim.com/challenges/black-friday) - Traffic is 12,000 RPS and the CFO capped infra at $3,000/month. Keep p99 under 300ms and errors under 1%.
* [Chaos Monkey](https://systemdesignsim.com/challenges/chaos-monkey) - A monkey will kill your busiest API server mid-run. Design for redundancy so users never notice.
* [The CTO Budget Cut](https://systemdesignsim.com/challenges/cto-budget-cut) - This system works - and burns about $15,000/month doing it. Hit the same SLOs for under $1,500/month.
