Engineering Decisions Middle interview questions and answers

14 questions for a Engineering Decisions (Middle) interview - with correct answers, explanations and links to the docs.

Take this quiz
  1. 1.A news feed serves 1M users, may lag by a minute, and every call to the upstream API is paid. What's the main approach?
  2. 2.After a transfer, the user opens their balance. The number must be exact, while the rest of the banking app reads from replicas. Where does this read go?
  3. 3.You're publishing an API for external partners who use many languages. Responses should work with CDNs, and a partner's first call should take minutes. Which style?
  4. 4.Web and mobile apps need very different data from the same services. Each client has its own team, and mobile suffers from large payloads. What do you add?
  5. 5.A sports site pushes live scores to browsers. Data flows only from the server, traffic passes through regular HTTP proxies, and reconnects must be simple. What fits?
  6. 6.A payment request timed out, so you don't know whether the charge went through. Charging twice is unacceptable, but the sale shouldn't be lost. What do you build?
  7. 7.Checkout calls a recommendations service that sometimes hangs for 30 seconds. Recommendations are optional, while checkout must stay fast. What do you do?
  8. 8.A sales dashboard runs a 40-second aggregation on each load. Managers open it a few times a day, and data from the last hour is enough. What's the fix?
  9. 9.An activity log has 50M rows, and OFFSET gets slower on deep pages. The UI only has "Older" and "Newer" buttons. How do you paginate?
  10. 10.A web app talks to its own API on the same domain. Support must be able to end a stolen session immediately. How do you handle sessions?
  11. 11.Checkout's p99 latency doubled. A request passes through six services, and logs don't show which one is slow. What do you reach for?
  12. 12.On-call engineers get dozens of alerts a night, and most need no action. Users, meanwhile, sometimes notice outages first. What do you alert on?
  13. 13.A rewritten pricing engine may fail only under real traffic. A bug would be costly, so you want to limit how many users it can reach. How do you release it?
  14. 14.A "like" button should feel instant on slow mobile networks. A rare failure isn't harmful and can simply be undone. How do you update the UI?