...

>

Put Back-of-the-envelope Numbers in Perspective

Put Back-of-the-envelope Numbers in Perspective

Define BOTECs and their role in simplifying complex System Design problems. Explore foundational numbers, including server types, latencies, and request classifications (CPU, memory, IO-bound). Learn to abstract real-world complexity to quickly estimate critical metrics, such as requests per second (RPS).

Back-of-the-envelope calculations (BOTECs) are quick, approximate estimations typically performed on paper. While not intended to yield precise results, they provide a preliminary evaluation of a system’s feasibility and critical parameters.

For example, to estimate a neighborhood’s population, you might count houses in a sample area and multiply by the average household size. This is faster than conducting a full census. Similar calculations can validate data or test assumptions.

BOTECs in system design

Modern systems consist of many interconnected computational components. Although architectures vary, such as monolithic and microservice architectures, accounting for every node type, load balancers, caches, and databases is impractical in a design interview. Back-of-the-envelope calculations (BOTECs) help estimate capacity and resource requirements without modeling every infrastructure component.

Common estimations include:

  • Concurrent TCP connections a server can support.

  • Requests per second (RPS) a web, database, or cache server can handle.

  • Storage requirements for a service.

We use BOTECs to abstract hardware specifics, latencies, and throughput rates. We will first examine server types and latencies to understand the system’s reality. Then, we will simplify these details to estimate RPS, bandwidth, and storage capacity.

Types of data center servers

Data centers use commodity hardware to scale cost-effectively. Below, we discuss common server types used to handle different workloads:

An approximation of the resources required on the web, application, and storage layer of the server, where the y-axis is a categorical axis with data points indicating levels of low, medium, and high resource requirements
An approximation of the resources required on the web, application, and storage layer of the server, where the y-axis is a categorical axis with data points indicating levels of low, medium, and high resource requirements

Web servers

Web servers are the first point of contact after load balancers and typically handle API calls. They are decoupled from application servers for scalability. While memory and storage requirements are often moderate, web servers need strong processing power. For example, Facebook has used web servers with 32 GB RAM and 500 GB storage.

Application servers

Application servers execute business logic and generate dynamic content. They often require significant computational and storage resources. Facebook has deployed application servers with 256 GB RAM and 6.5 TB of hybrid storage (flash and rotating disk).

Storage servers

As data grows, services use specialized storage units. YouTube, for example, uses:

  1. Blob storage: For encoded videos

  2. Temporary ...