Scenario: a slow payment provider takes the site down
Checkout calls a third-party payment provider. During the evening peak its responses slow from 200 ms to 30 seconds. Requests pile up waiting on it, and within minutes even browsing and search stop responding. Redesign so one slow dependency can’t take the whole site down.
Functional requirements
- Shoppers browse, search and add to cart
- Checkout charges the card through the payment provider
- Shoppers find out whether their order went through
Non-functional requirements
- Browsing stays fast whatever the provider does
- No card is charged twice
- Orders placed while the provider is struggling still complete once it recovers
Scale
- 3,000 checkouts a second at the evening peak
- Browsing and search bring about 15 times as many requests as checkout
- Each server handles at most 200 requests at once
How you’ll be scored
10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works
What interviewers look for
- Clarify before you draw. State what is in and out of scope. For “Scenario: a slow payment provider takes the site down”, that starts with: Shoppers browse, search and add to cart; Checkout charges the card through the payment provider; Shoppers find out whether their order went through. Interviewers notice candidates who pin the requirements down first.
- Turn the scale into numbers. The scale (3,000 checkouts a second at the evening peak; Browsing and search bring about 15 times as many requests as checkout; Each server handles at most 200 requests at once) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
- Show how each quality is met. Your design should visibly deliver: Browsing stays fast whatever the provider does; No card is charged twice; Orders placed while the provider is struggling still complete once it recovers. Saying that it does isn’t enough; point to the part of the design that makes it true.
- Expect follow-ups on the hard parts. Interviewers usually probe scenario, resilience and payments here. This is a medium problem, so interviewers expect you to weigh two reasonable options, such as consistency against latency, and to say why you picked one.
- Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.