System Design Atlas

Hotel inventory and room pricing

03 / 10Worked example

Scale estimates

What loads do the average rate, test peak and hotspot describe for reservations?

The commitment for reservation R-27 will be examined under an explicitly assumed scale. 7200 events are spread over 24 operating hours. A test peak of 30 events per second and the hotspot “50 requests for the last available night” check different properties than the mean.

Starting point Commit all nights of a stay together.

Assumptions for the example case

Own fictitious example design. One hotel, one room category, full nights and a fixed offer in EUR without prepayment. A price offer is valid for 300 seconds; at exactly 300 seconds, a new confirmation is rejected. All figures and test goals are illustrative assumptions.

Baseline load, peak load and domain hotspot

Three separate scale views

7,200 / 24 hoursStorage and deferred-processing volumePlan capacity
30/s for 900 sShort test peakTest throughput
50 requests · last nightDomain contention pointTest either order of competing requests

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

Daily-load bar 7200 events / 24 h, peak-load column 30/s, magnifying glass section: 50 requests for the last available night. These are separate views rather than one linear processing chain.

Reproducible test profile calculations

  1. 01

    Average event rate

    0.0833333 Events/s

    7200 ÷ (24 × 3600 seconds)

    For the designBase load for channel reconciliation; long business waiting times are not included.

  2. 02

    Assumed test peak

    30 events/s

    30 × 900 seconds = 27000 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

    14.06 MiB/day

    7200 × 2048 byte ÷ 1048576

    For the designMetadata budget for room-category inventory per night, offers and reservations; document content, indices, replicas and backups are added.

  4. 04

    Domain hotspot

    50 requests for the last available night

    Separate concurrency or ordering test for the same business identity.

    For the designTwo confirmations claim the last night. In either order of competing requests, exactly one reservation receives every night; the other receives a conflict and no partial allocation.

The last available night determines the concurrency test

The last available night determines the concurrency test

The last available night determines the concurrency test.

50 requests for the last available night

An average of 0.0833333 events/s says little about 50 requests for the last available night. The exercise specifies the input and expected result.

Alternative considered
A test with only 0.0833333 events/s does not capture the concentrated contention.
Trade-off
The separate hotspot profile requires a controlled sequence in addition to the 27000 event test.
Reassess
Measured real peaks above 30 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
7200 ÷ (24 × 3600) = 0.0833333 events/s. 30 × 900 = 27000 events.
Domain hotspot
Two confirmations claim the last night. In either order of competing requests, exactly one reservation receives every night; the other receives a conflict and no partial allocation. The average rate alone cannot prove this commitment.

Apply to your project

Which individual entity in your project concentrates load more strongly than the daily average in this room-night reservation example?

Next: Confirmation binds price offer version.