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.