Skip to content
Amol Dighe
Go back

Back-of-the-Envelope Simplified

Edit page
Back-of-the-Envelope Simplified
Image generated with Google Gemini

What is Back-of-the-Envelope ?

Before you design a system, decide the LB, Servers, Database, Cache you need to know a few estimates:

These estimates are used as part of Back-of-the-envelope calculation which is called so as the numbers are suppose to fit on back of an envelop.

Back-of-the-envelope estimation is a rough calculation, that tells you the approximate size of the system you are about to design.

Estimation steps:

Write down the assumptions (how much ?) >>> 100 million users, 10 pecentage post daily, 500KB a photo

Arithmetic (calculate per day & per hour) >>> 10 million writes per day, 100 writes per second, 5TB a day

What it implies for the design >>> Read Heavy, Needs a cache and a CDN, Object Storage

Rules for estimation:

Estimation needs system requirements, it sits between clarifying the requirements and drawing the high-level design.

graph LR
A(Clarify the Requirements) -->B(Estimate the Size) -->C(High Level Design) -->D( Deep Dive on each component)

What is the data size (data Sizing)?

Based on the type of data a system handles, it is helpful to know type of data & size of data in the system. This concept will ease the further calculation.

UnitRoughlySomething that size
ByteOne character of textThe letter A
Kilobyte (KB)A thousand bytesA page of plain text
Megabyte (MB)A million bytesA high quality photo
Gigabyte (GB)A billion bytesA feature length movie
Terabyte (TB)A thousand GBA laptop hard drive
Petabyte (PB)A thousand TBThe photo library of a large service

Few sizes worth memorizing are the ones you will multiply by a user count.

ObjectAssume
A short text post, with its metadataHundreds of bytes
A thumbnail imageTens of KB
A compressed photoHundreds of KB
A minute of streaming videoTens of MB

How long an operations take?

OperationRoughly
Read from memory100 nanoseconds
Read from an SSD100 microseconds
Round trip inside one data center500 microseconds
Seek on a spinning disk10 milliseconds
Round trip across the world150 milliseconds

Time Calculation

The focuse here is 24hours (per day) & Seconds calculation for traffic in a system design. This help work the QPS part of estimation given by the business team, where you will want to estimate the per second traffic to the system being built.

Remember A day has 86,400 seconds. Round it to 100,000.

Per day TrafficHow many request per second ?
100,0001
1 million10
100 million1,000
1 billion10,000

Remember Traffic is never spread evenly across the day, so the average is not the number to build for. Peak traffic is commonly two to three times the average, and a service with a sharp daily cycle can be higher still. State the multiplier you are using and apply it once, at the end.

Estimation Flow :

Traffic (QPS)

Start with writes, because writes are usually the smaller and better understood number, then derive reads from them.

Key Consideration:

The ratio decides whether the design is about handling writes or about serving reads, and those lead to different systems.

Storage

Storage is the amount of new data written each day, multiplied by how long you keep it.

Bandwidth

Bandwidth is data per second, so it is QPS multiplied by the size of one object.

Cache Memory - How much memory a cache needs?

The usual assumption is that a small share of the content gets most of the requests, often stated as 20 percent of the objects serving 80 percent of the reads.

Cache size is calculated by taking the 1/5 of objects accessed in a day and multiplyed by the object size.

Flow of estimation:

StepNeedsProduces
TrafficUsers, actions per user, read to write ratioWrite QPS, read QPS, peak QPS
StorageWrite QPS, object size, retention, replicationTotal data kept
BandwidthBoth QPS numbers, object sizeBytes per second in and out
MemoryRead traffic, object size, hit ratioCache size

For better understanding, lets build on above concepts. Back-of-the-envelope estimation is a rough calculation with round numbers that tells you the approximate size of a system before you design it. It exists to test whether a design is feasible, to size its components, and to show your reasoning.


Edit page
Share this post:

Next Post
NVIDIA Computex 2026 Keynote Highlights