System Design Atlas

Parcel delivery with offline synchronisation

03 / 10Worked example

Scale estimates

What number is not a storage forecast?

The calculation makes assumptions and missing overheads visible.

Starting point Look for factors not included.

Assumptions for the example case

Illustrative design: 100,000 shipments per day, 50 events per shipment, 250 bytes of raw data per event, 500 events/s peak. This yields 5 million events and 1.25 GB of raw data per day. Retention, indices and replication are added.

Load model

The mean, peak and raw data remain separate.

Calculations

  1. 01

    Events

    5,000,000/day

    100,000 × 50

    For the designStorage and indices are added.

  2. 02

    Average

    57.87/s

    5,000,000 ÷ 86,400

    For the designThe real route is unevenly distributed over time.

  3. 03

    Raw data

    1.25 GB/day

    5,000,000 × 250 bytes

    For the designProjections and replicas increase the need.

Terms in this step

Write amplification
An event can trigger index, projection and replica write operations.

Try it yourself

Name two overheads for raw data calculation.

A hint for your attempt

Think of search and failure protection.

Compare with a possible solution
Indices
Additional structures.
Replication
other copies.

Apply to your project

Calculate seven days of raw data without overheads.

Interfaces carry key and result.