...

>

Examples of Resource Estimation

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)500Million
Requests on average / user / day20
Total requests / dayf10Billion
Total requests / secondf115K
Total servers requiredf2
1.

Can you identify a hidden assumption in our calculations above?

Show Answer
Did you find this helpful?

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 request and response distributionsA request-response distribution refers to the statistical pattern or model that describes the timing and frequency of requests made to a system or service and the responses provided by that system or service. For example, we can measure the number and types of incoming requests in 24 hours., which are often available at the prototyping levelThe prototyping level refers to the early stage of product development, where a basic version is created for testing and design validation before full development. It helps identify and address issues early in the process.. Alternatively, we might assume a statistical model like the Poisson distribution.

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:

Number of servers required for a Twitter-like service
Number of servers required for a Twitter-like service

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 ...