Skip to content

Estimating Northwind’s Launch-Day Traffic Before It Arrives

12 min reading

Derive traffic, bandwidth, storage and cache demand, then test which assumptions change the design.

Page details

Workload and constraints · Lesson 01

Published · Sources · 12 min reading · Last edited:

Know first: Numbers Every Engineer Should Know; Reading Architecture Diagrams.

Editorial correction:

Earlier revisions implied guaranteed cache hit rates and universal sizing rules. This chapter replaces those claims with declared hypothetical assumptions and derived examples; no author-run performance experiment is asserted.

More
20px

Northwind: Capacity estimation: follow the workload through the system

Outcome. After this lesson, you can translate the campaign into component demand.

Hypothetical scenario. At Northwind, Maya emails 120,000 subscribers. Dev models the clicks before the promotion starts.

In short. Derive peaks from an explicit arrival window. Keep peak assumptions separate from measured traffic.

Start with a user action

Hypothetical scenario. A catalogue service lets people read item descriptions and update listings. Before choosing machines, a designer needs to understand the demand: how many reads arrive, how large their responses are, how much new data is retained, and what happens when a cache cannot answer.

The purpose of capacity estimation is to expose a design's assumptions and likely constraints. It does not produce a trustworthy server count from a user count alone. Two applications with the same audience can have different request mixes, response sizes, data retention and computational work. An estimate becomes useful when another engineer can change an assumption and follow its consequences.

By the end of this lesson, the reader should be able to separate daily volume from arrival rate, payload from provisioned storage, and cache allocation from hit rate. The next networking lesson uses the resulting traffic assumptions; a bandwidth estimate must carry its exclusions with it.

Why one big throughput number fails

“The service needs this many requests per second” is incomplete. Reading a small cached record and running a wide database query are both requests, but they consume different resources. Google's Handling Overload chapter explains why request count can be a poor proxy for resource consumption when request costs change.

A daily average also hides when work arrives. Dividing daily volume by the length of a day gives a useful baseline, not a peak forecast. A launch, a scheduled import, a cold cache or retrying clients can create a different workload. Choose named scenarios and later replace their assumptions with appropriate measurements.

Keep dimensions visible. Requests per day, bytes per request and retained bytes are different quantities. Multiplying request volume by response size estimates transferred payload, not necessarily newly stored data. Repeatedly reading the same item does not create another copy of that item in the cache.

Follow demand through the components

Model the work at each boundary. A read may be served from cache or become a database operation. A write may update durable data and invalidate a derived copy. Response traffic travels back to the caller. Replication and background maintenance introduce other work that must be accounted for separately.

Conditional catalogue demandA hypothetical twenty-five thousand reads per second reach a cache. At an assumed eighty-percent hit rate, five thousand read misses reach the database along with two hundred fifty writes. A cold-cache scenario sends all reads to the database. These logical rates do not specify hardware. Read demand25,000/sCacheconditional hitsDatabasemisses + writesWarm: 5,000 + 250 = 5,250 operations/sCold: 25,000 + 250 = 25,250 operations/s

The diagram deliberately names logical demand rather than a number of servers. Selecting instances requires evidence about usable capacity under the request mix, latency objective and failure conditions. A cache-hit assumption cannot stand in for that evidence.

Translate the campaign into component demand

Maya's campaign provides a concrete arrival scenario. In this hypothetical calculation, 120,000 recipients multiplied by a 15% click assumption gives 18,000 visits. If 60% of those visits arrive in the first minute, the first-minute volume is 18,000 × 0.60 = 10,800 visits, and 10,800 / 60 = 180 visits per second. Neither percentage is an observed campaign result. They are explicit assumptions that a later measurement can replace independently.

A visit is still not a request to every component. Suppose, solely for this example, the landing page makes three catalogue requests per visit. Catalogue demand is 180 × 3 = 540 requests per second. With an assumed warm hit fraction of 80%, misses contribute 540 × 0.20 = 108 reads per second to Postgres. A completely cold Redis cache contributes 540 instead. The required backend envelope therefore includes both states, rather than treating 108 as a guaranteed ceiling.

Separate the resource budgets before choosing a deployment. Payload bandwidth depends on response size; database pressure also depends on predicates, rows examined and writes; cache memory depends on retained objects and representation overhead. There is no valid conversion from 540 requests per second to a specific machine count without a service-capacity measurement under the same workload. A capacity plan should identify which measurement would resolve that missing conversion.

The useful output is a decision with a range of consequences. If the first-minute share doubles while total visits stay fixed, the burst rate doubles but daily retained data does not. If response size doubles, payload bandwidth doubles without establishing any change in the number of database operations. Following those dimensions separately prevents one optimistic average from silently deciding the whole architecture.

Derive the catalogue budget

Hypothetical scenario. Choose 100 million active users and ten reads per user per day. Daily reads are 100,000,000 × 10 = 1,000,000,000. A day contains 24 × 60 × 60 = 86,400 seconds, so average read demand is 1,000,000,000 ÷ 86,400 ≈ 11,574 reads/s. Separately choose ten million writes per day: 10,000,000 ÷ 86,400 ≈ 115.7 writes/s.

For a peak planning scenario, choose 25,000 reads/s and 250 writes/s. These values are assumptions, not measured peaks or universal multiples of the average. With a chosen 2,000-byte response, read response payload is 25,000 × 2,000 = 50,000,000 bytes/s = 50 decimal MB/s. Multiplying by eight bits per byte gives 400 Mbit/s. Requests, protocol overhead, replication and compression are outside this payload-only budget.

Assume each write adds a new retained 500-byte record. Raw growth is 10,000,000 × 500 = 5,000,000,000 bytes/day = 5 decimal GB/day. Choose 365-day years and no deletion. Annual growth is 5 × 365 = 1,825 GB = 1.825 TB. Five years give 9.125 TB. Three full copies give 9.125 × 3 = 27.375 TB. A separately chosen twenty-percent index allowance on each copy gives 27.375 × 1.2 = 32.85 TB. This excludes logs, backups, temporary rewrite space and other implementation overhead.

The assumption that every write adds a retained record matters. Updating an existing value, retaining old versions and appending an event have different storage consequences. State the chosen retention model rather than automatically treating every write as permanent growth.

For cache allocation, choose fifty million distinct items with 2,000 bytes of cached payload each: 50,000,000 × 2,000 = 100 GB. Selecting ten million items requires 20 GB of payload. A hypothetical twenty-five-percent overhead allowance gives 20 × 1.25 = 25 GB. That allowance is not a measured property of a particular cache implementation.

If the chosen hit rate is eighty percent, peak hits are 25,000 × 0.8 = 20,000 reads/s and misses are 25,000 − 20,000 = 5,000 reads/s. Assuming one database operation per miss and one per write, backend demand is 5,000 + 250 = 5,250 operations/s. With no cache hits, it is 25,000 + 250 = 25,250 operations/s. Neither count establishes how many database instances are needed.

In the wild: Translate the campaign into component demand

The primary reference establishes this concrete distinction: request costs can differ; request rate alone may not represent resource demand.

Test which assumption controls the answer

Change one assumption and trace what moves. Doubling response payload doubles the response-bandwidth estimate but need not double request-processing work. Extending retention changes stored data without necessarily changing current arrival rates. A more expensive query can reduce usable request capacity without changing payload size.

Cache behavior is particularly easy to overstate. Allocating a fraction of the dataset does not establish a corresponding fraction of requests served. Key popularity, expiration, invalidation and replacement policy affect reuse. Measure the relevant workload and examine whether aggregate hit rate hides expensive misses or uneven traffic across keys.

There is no universal headroom multiplier in this lesson. Reserve capacity for explicitly chosen uncertainty, growth and failure scenarios. If a replica is unavailable or a cache is rebuilding, the remaining system needs a defined service objective and admission behavior. “Add more machines” is not a complete explanation of the recovery path.

When the cache restarts

Hypothetical scenario. The catalogue database is evaluated only at the warm-path demand of 5,250 operations/s. A cache restart removes the assumed read hits. Logical demand rises to 25,250 operations/s under the same chosen peak traffic. Clients interpret delayed responses as failures and retry, creating additional work that the original model did not include.

The problem is not an incorrectly multiplied cache-size figure. The design omitted a changed operating condition. Examine cold-start behavior, request admission, bounded retries and whether some responses can degrade safely. Test those decisions against the required freshness and correctness; serving stale data is not acceptable merely because it is cheaper.

A corrected estimate should name the missing scenario and the evidence needed to evaluate it. It should not claim that a particular warming strategy guarantees recovery or that this hypothetical incident occurred in production.

Shortcuts that change the question

“Daily reads determine cache memory.” Reads count accesses; memory depends on retained keys, values, representations and implementation overhead.

“A twenty-percent cache guarantees eighty-percent hits.” That is an access-distribution assumption requiring evidence, not a property of allocating memory.

“A nominal network rate proves the latency target.” The payload estimate excludes other traffic, and bandwidth alone does not establish queueing or tail latency.

“Two bytes per character is a safe universal average.” RFC 3629 defines variable-length UTF-8 encoding. Measure the actual encoded text and stored representation; a visible character can involve multiple Unicode scalar values.

Use the estimate to choose the next measurement

Use this model to compare proposed designs, identify expensive assumptions and define useful load scenarios. Carry the units and exclusions into the next networking and storage lessons. A reviewer should be able to ask what changes if traffic arrives differently, records grow, or a dependency disappears.

Before provisioning, evaluate the actual request mix and latency objective, then inspect the limiting resources. Google's monitoring chapter describes traffic, latency, errors and saturation as complementary service signals. A single throughput number can conceal a resource limit or unacceptable behavior for a particular class of requests.

Do not use a rough estimate as a vendor benchmark, price quotation or guarantee of reliability. Its value is the argument it makes inspectable: this workload creates this demand under these assumptions, and these observations are needed before making the next commitment.

Limits of this model

The campaign and cache fractions are teaching assumptions. Provisioned capacity still requires representative service measurements, and these payload budgets exclude protocol overhead and maintenance. A coherent estimate narrows the unknowns; it does not supply hardware throughput or establish that a launch will meet its objective.

Check yourself: revise the demand model

The assumed read hit rate falls to sixty percent at the same peak. What backend demand follows?

Misses are 25,000 × (1 − 0.6) = 10,000 reads/s. Add 250 writes/s to obtain 10,250 logical operations/s under the one-operation assumptions. This is a demand estimate, not measured backend capacity.

Retention falls from five years to one year while arrival rates stay unchanged. Which figures change?

Raw retained payload becomes 1.825 TB. With the same three copies and twenty-percent index assumption it becomes 1.825 × 3 × 1.2 = 6.57 TB. Current request rates and response bandwidth do not automatically fall. Deletion and maintenance work may need separate modeling.

Would doubling cache RAM prove the cold-cache scenario is solved?

No. More allocated memory does not establish that the desired records are present when requests arrive. Specify warming, access distribution, admission and recovery behavior, and evaluate the database demand while the cache is empty.

Northwind decision log

Derive peaks from an explicit arrival window.
Keep peak assumptions separate from measured traffic.
Recalculate when the promotion schedule changes.

Go deeper: Translate the campaign into component demand

Related blog: Cost accounting after estimating campaign demand.