Capacity Estimation In System Design

What is Capacity Estimation ?
Capacity estimation is a crucial aspect of system design, ensuring that resources are allocated efficiently to handle varying loads while maintaining performance. In this article, we’ll explore a structured method for capacity estimation using a real-life example of managing website traffic for an e-commerce platform.
Scenario : Website Traffic Management
Let’s say we’re designing an e-commerce website which is expected to handle a large traffic of users on the day of sale on our platform
Consider the Sample data below :
- Expected Requests: 2 million requests per day.
- SLO: 100 milliseconds for 90% of requests (P90 latency).
- Average Processing Time: 35 milliseconds per request.
Capacity Estimation basically involves ensuring that the system meets demand without compromising Service Level Objectives ( SLO)
Key Metrics :
- Service Level Objective (SLO): The maximum acceptable latency for a request is 100 milliseconds.
2 . Current Number of Requests:
- Total daily requests: 2,000,000
- Request per second (RPS) : 2,000,000 / 86,400 — → 24 requests
3. Average Capacity of a Single Unit: Time taken by one unit (server) to process a request is 35 milliseconds.
Derived Metrics :
- Acceptable Backlog per Instance: This is the maximum no. of request an instance or you can say server can handle given that it is within the limit of SLO
Mathematically it is , SLO / Avg Processing Time — 100/35 ~ 3 requests
2. Backlog per Instance: The total load flowing into a single instance based on current traffic.
Mathematically it is , Demand / Avg Processing Time
For 1 instance: 24/1 ~ 24
Total Number of Instances Required:
Total Units Required : Backlog per instance/ Acceptable Backlog = 24/3 = 8 Instances.
That’s it! You’ve covered Capacity Estimation . Feel free to follow me and share your thoughts on what else I can improve.
See you in the next part! 😊