Examples of Resource Estimation
Explore practical resource estimation by applying BOTECs to a high-scale service. Quantify server count, storage needs, and bandwidth requirements based on traffic assumptions. Learn to adjust peak load estimates using principles such as the Pareto principle to ensure System Design feasibility and manage costs.
Introduction
We’ll now apply these resource estimation techniques to a Twitter-like service. Using baseline assumptions, we’ll estimate the required number of servers, storage capacity, and network bandwidth.
Number of servers required
We make the following assumptions for a Twitter-like service:
Assumptions:
500 million (M) daily active users (DAU)
Average of 20 requests per user per day
Single server capacity (64 cores): 64,000 requests per second (RPS)
Estimating the Number of Servers
| Daily active users (DAU) | 500 | Million |
| Requests on average / user / day | 20 | |
| Total requests / day | f10 | Billion |
| Total requests / second | f115 | K |
| Total servers required | f2 |
Can you identify a hidden assumption in our calculations above?
Plausibility test: Always judge if numbers are reasonable. For example, estimating two servers for a service with millions of DAUs is likely incorrect.
Peak capacity
Large services must handle flash crowds. To estimate peak capacity, we assume a worst-case scenario where all daily requests arrive simultaneously. More accurate estimates require
To simplify, we use DAU as a proxy for peak load in a specific second. This treats the total daily active users as the number of requests per second. The number of servers at peak load is calculated as follows:
If all workloads arrive simultaneously and each server handles 64,000 RPS, we would need approximately 157,000 servers. As this is likely unfeasible, we have two options to address the issue.
Improving the RPS of a server
If the peak load assumption holds, we must increase server capacity. For example, if we are limited to 100,000 ...