KatInterview

Prepare a Flash-Sale Platform for a 50x Traffic Surge

System DesignModel answer
MediumModel answerSystem Designarchitecture-reviewscalabilityavailability

Last updated

Audit a small web stack ahead of a 50x traffic spike, pick the three most dangerous weaknesses, propose fixes, and plan the work for three engineers over four weeks.

Scenario

You are the lead engineer for a "Flash Sales" web service that has been in production for two years. Today it serves about 1,000 requests per second (RPS). A large marketing campaign is coming, and the business expects peak traffic of 50,000 RPS.

Current setup

  • Application tier: one monolithic web application running on three EC2 instances behind an Application Load Balancer.
  • Database: a single primary MySQL instance on RDS, with no read replicas.
  • Product images: read from the local disk of whichever application server handles the request.
  • User sessions: held in each server's process memory, in plain in-memory maps.
  • Monitoring: CPU and memory alarms that send email.

Your task

  1. Pick the three biggest risks that would make this system fail at the new load.
  2. For each, propose a mitigation.
  3. Explain how you would sequence the work, given three engineers and four weeks before the event.

Requirements

  • Your analysis must cover availability, data consistency, and latency.
  • Justify why your three risks outrank the other weaknesses you noticed.
  • Discuss the blast radius of each change you propose, meaning how much can go wrong if the change misbehaves and how easily it can be rolled back.

Be ready for follow-ups such as how you would protect the database with a circuit breaker, and what you would do if writes still became the bottleneck.

Hints

Hint 1

Start with assumptions: is 50k RPS a peak or an average, what is the read/write split, and is overselling acceptable? Then do quick capacity math: three servers handling 1k RPS implies roughly 150 servers at 50k RPS, which a stateful tier cannot reach.

Hint 2

Look for the components that are single points of failure or that block horizontal scaling: the lone database, state stored inside app processes, and bulky static content served by application servers.

Hint 3

Rank work by impact divided by (effort times blast radius). Config-level, reversible changes go first; changes touching correctness, such as inventory handling, go behind feature flags and need the longest soak time. Say explicitly what is out of scope, such as splitting the monolith.

Hint 4

Explain why monitoring is not in your top three: it slows detection rather than causing the outage, and it is cheap to fix in week one.