System Design Atlas

Rail timetables and disruption information

03 / 10Worked example

Scale estimates

What loads do the average, test peak and hotspot describe for this train service?

Test the guarantee for train service F-24 at an explicitly assumed scale. There are 86400 events over 24 operating hours. A test peak of 20 events per second and a hotspot of 100 reports for the same service arriving in reverse source order test different properties from the average load.

Starting point Every forecast includes freshness information.

Assumptions for the example case

Original fictional design: a regional rail line with dated services, stops and manually confirmed cancellations. An actual-status report is current at age < 90 seconds; at 90 seconds its timestamp is marked stale. All figures and test targets are illustrative assumptions.

Baseline load, peak load and domain hotspot

Three separate scale views

86,400 / 24 hStorage and deferred-processing volumePlan capacity
20/s for 900 sShort test peakTest throughput
100 reports · One train serviceDomain contention pointTest either order of competing requests

Daily volume, test peak and domain hotspot determine different tests.

Daily-load bar: 86400 events over 24 h. Peak column: 20/s. Hotspot detail: 100 reports for the same service in reverse source order. These are separate load views.

Reproducible test profile calculations

  1. 01

    Average event rate

    1 event/s

    86400 ÷ (24 × 3600 seconds)

    For the designBase load for feed processing; long business waiting times are not included.

  2. 02

    Assumed test peak

    20 events/s

    20 × 900 seconds = 18000 events in the 15-minute test

    For the designThis deliberately higher test load checks response time and backlog. It is an assumption, rather than a peak measured in production.

  3. 03

    Raw data per day

    42.19 MiB/day

    86400 × 512 bytes ÷ 1048576

    For the designMetadata budget for train service status, source reports and cancellation history. Document contents, indexes, replicas and backups require additional storage.

  4. 04

    Domain hotspot

    100 reports for the same train service in reverse source order

    Separate concurrency or ordering test for the same business identity.

    For the designTwo reports with source versions 8 and 9 arrive in both orders: version 9 remains visible; version 8 is retained in history and does not overwrite the display.

Test a hotspot on a single train service separately

Test a hotspot on a single train service separately

Test a hotspot on a single train service separately.

100 reports for the same train service in reverse source order

An average of 1 event/s says little about 100 reports for the same train service arriving in reverse source order. The exercise specifies the input and expected result.

Alternative considered
A test with only 1 event/s does not capture the concentrated contention.
Trade-off
The separate hotspot profile requires controlled ordering in addition to the 18000-event test.
Reassess
Measured real peaks above 20 events/s change the load profile.

Try it yourself

Calculate mean rate and number of events in the 15-minute peak test. In addition, explain what the hotspot test proves.

A hint for your attempt

Convert operating hours into seconds first; the peak test lasts 900 seconds.

Compare with a possible solution
Calculation
86400 ÷ (24 × 3600) = 1 event/s. 20 × 900 = 18000 events.
Domain hotspot
Two reports with source versions 8 and 9 arrive in both orders: version 9 remains visible; version 8 is retained in history and does not overwrite the display. The average rate alone cannot verify this guarantee.

Apply to your project

Which individual entity concentrates more load than the daily average suggests in passenger information?

Next: source versions take precedence over arrival order.