Skip to content

Numbers Every Engineer Should Know: Units, Latency, and Back-of-the-Envelope Math

6 min reading

Outcome: Convert workload and storage quantities into rates and capacity estimates, keeping units, peaks and assumptions visible.

Page details

System Design foundations · Chapter 2 · Sources

Published · Last edited: · ~6 min reading · ~17 min with practice

20px

Know first: What Happens When You Open a Web Page: DNS, TCP, TLS, and HTTP

System Design foundations glossary

Hypothetical scenario. Maya tells Dev that Northwind may serve a million catalogue requests tomorrow. That sounds large, but it does not yet specify a rate, peak, response size or deadline. Useful engineering arithmetic begins by naming the quantity rather than reacting to the number.

Put a unit on every number

A byte contains eight bits. Network rates are often expressed in bits per second, while payloads and storage are often counted in bytes. Confusing the two creates an eightfold error before any architecture decision is made. Write the conversion beside the calculation so another reader can follow it.

This track uses decimal storage units unless explicitly stated otherwise: one kilobyte is 1,000 bytes, one megabyte is 1,000,000 bytes and one gigabyte is 1,000,000,000 bytes. Binary units use different names: a kibibyte is 1,024 bytes. NIST's binary-prefix guidance distinguishes these conventions. A number labeled only “MB” should not silently change meaning halfway through an estimate.

Turn a day into a rate

A day contains 24 hours × 60 minutes × 60 seconds = 86,400 seconds. Divide the chosen 1,000,000 requests by 86,400 seconds to get approximately 11.57 requests per second, commonly rounded to 11.6 requests/s for an initial average. The units cancel as requests/day divided by seconds/day.

That average is not a safe peak-capacity target. Suppose, as an additional assumption, 20% of the day's requests arrive in ten minutes. The burst contains 1,000,000 × 0.20 = 200,000 requests. Ten minutes contain 600 seconds, so its average is 200,000 / 600 ≈ 333.3 requests/s. The overall daily average concealed a much busier interval.

Count requests1,000,000 / dayName the window86,400 secondsCompute the rate11.57 / second
Count requests: 1,000,000 / day → Name the window: 86,400 seconds → Compute the rate: 11.57 / second. Illustrative conceptual flow.

Even a ten-minute average can hide second-by-second spikes. State the time window whenever reporting a peak. A capacity estimate is easier to challenge when its workload assumptions are visible: readers can replace the assumed burst fraction without rebuilding the whole explanation.

Separate payload from provisioned space

For Northwind’s Postgres estimate, choose one million user profiles, each with a logical payload of two kilobytes. Two kilobytes means 2,000 bytes here. Multiplying 1,000,000 × 2,000 gives 2,000,000,000 bytes, or 2 GB. That is the profile payload, not a claim about the final database size.

If the design keeps three full copies, the chosen payload alone becomes 2 × 3 = 6 GB. Indexes, logs, storage allocation, metadata, backup retention and free space are additional quantities. Add them when their assumptions are known; do not hide them in a mysterious “production multiplier.” A rough estimate should expose uncertainty instead of pretending the unknown parts are zero.

The same discipline applies to transfer time. Sending a 2 MB payload over an illustrative 8 megabit/s link means 2,000,000 × 8 = 16,000,000 bits. Dividing by 8,000,000 bits/s gives two seconds of idealized serialization time. Connection setup, contention and retransmission add to it. A fast round trip cannot eliminate the time required to transmit a large payload.

Use a latency ladder as a question

In the wild. Jeff Dean's Stanford systems talk includes historical order-of-magnitude latency estimates. Its examples put a main-memory access around 100 nanoseconds, a datacenter round trip around 500 microseconds and an intercontinental round trip around 150 milliseconds. These are dated reference values, not measurements of Northwind or guarantees for current hardware.

A nanosecond is one billionth of a second, a microsecond one millionth and a millisecond one thousandth. CPU-cache operations can be on the nanosecond scale. The useful lesson is the gap between scales: an extra remote round trip can dominate many local operations. The actual machine, access pattern, load and percentile determine the measured result.

An average is not a promise

Misconception: peak traffic equals average traffic with a little spare room. Peak depends on behavior and the chosen interval. A marketing launch, scheduled batch or retry wave can concentrate demand. Keep the original demand assumptions alongside the rounded output, and ask what happens if they are wrong.

Use back-of-the-envelope math to compare plausible designs, expose missing denominators and identify the next measurement. It is less useful when presented with more decimal places than the inputs justify. An estimate of 11.57 requests/s does not mean tomorrow's arrival process is known to a hundredth of a request.

For every result, finish with three questions: what was counted, over what interval, and what was excluded? This makes estimates composable. The database chapter will explain why the logical 2 GB and the index/update costs are distinct; the concurrency chapter will connect requests per second with how many requests are waiting at once.

Check yourself

Can 12 requests/s of capacity safely handle the million-request day?

Not from the daily average alone. The illustrative concentrated burst averages roughly 333 requests/s over ten minutes; shorter peaks and recovery load need separate assumptions.

A dashboard reports 8 Mb/s. Can it transfer 2 MB in a quarter second?

No. Two decimal megabytes contain 16 megabits, giving two idealized seconds at 8 megabits/s. Mb and MB represent different units.

Do one million 2 KB profiles require exactly 2 GB of disk?

Only the chosen logical profile payload is 2 GB. Copies, indexes, logs and storage overhead require additional, explicitly stated estimates.

Go deeper