Handle traffic spikes and estimate server capacity
HeadwaySoftware Engineer · Technical ScreenLast updated
This question evaluates a candidate's competency in performance troubleshooting, capacity planning, and scalable system architecture, focusing on diagnosing overload causes and quantifying infrastructure needs.
Scenario
You are designing and operating a backend service that receives API requests from clients. Recently, the service becomes slow or times out when request volume spikes.
Questions
- Too many requests cause the server to slow down. What would you do to diagnose and mitigate the issue?
- Assume you can change both infrastructure and application code.
- Discuss both immediate mitigations and longer-term architectural changes.
- Given a set of assumptions (users, request rates, data volume), how would you estimate required server capacity?
- Explain what inputs you need (traffic, latency/SLO, CPU/memory per request, storage growth, peak-to-average factor, etc.).
- Provide a method to translate those assumptions into numbers of instances, database capacity, and network/storage needs.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.