System Design Atlas

Grocery orders with store inventory and substitutions

08 / 10Worked example

Bottlenecks and trade-offs

Which measurement distinguishes false availability from technical writing load?

The critical process only works well if we make its limits visible. A bottleneck limits throughput or waiting time at a specific point. A trade-off is a conscious choice with benefits and disadvantages. For this draft, we separately check the article hotspot, the timeliness of the movement feed and open payments; none of these bottlenecks are already measured.

Starting point Step 7 has clarified the payment error path; now different causes of waiting times are being investigated.

Assumptions for the example case

Own example design for pick-up from a store and packaged piece goods with strictly positive integer cent prices. Free and fully discounted baskets are outside the case. Replacement items are specifically allowed in advance; the final positive amount arises from goods actually provided and is collected on collection. Figures and target values are illustrative design assumptions.

From the symptom to the appropriate measure

Three test hypotheses · symptom, measurement and measure remain connected

Test hypothesis

Pick slowlyvisible symptom
Measure lock wait time on the item rowFirst observe
Shortening the long transactionModify against the findings

Test hypothesis

Frequent original-item shortagesvisible symptom
Feed age / sequence gaps / Compare shelf checkFirst observe
Improving stock reconciliationModify against the findings

Test hypothesis

Waiting for pick-upvisible symptom
Examine age E-17 and provider statusFirst observe
Accelerate payment clearanceModify against the findings

Lock waits, feed discrepancies and unresolved charges can look similar. Each cause needs its own measurement.

Locking waiting time, stockouts and open payments lead to a targeted measure via a suitable measurement.

Three starting decisions

Authorisation from the authoritative data store

The writing decision reads the authoritative P/Z state atomically; a cache may only speed up the assortment display.

The last pack meets parallel allocations and a possibly outdated assortment display.

The last pack requires a current validation state. A stale positive display against exhausted stock must produce a controlled conflict.

Alternative considered
An approval from the cache can promise outdated availability several times.
Trade-off
Each promise requires access to the authoritative data store.
Reassess
Measured reading bottlenecks can justify a different reading strategy; the atomic decision source remains necessary.
Lock in feed gaps

Block new approvals of the affected store until the joint matching has been completed.

A missing stock-decrease event leaves the store movement sequence incomplete.

Commitments require a comprehensible level of movement. A sequence gap generates a visible blocking ground and the restart follows only after the matching.

Alternative considered
Resale on an unexplained level increases shortages.
Trade-off
During clarification, possible sales are lost.
Reassess
Reliable source contracts can later allow a more limited block.
Separate working classes

Payment reconciliation and feed import as separately limited work classes in the same background process.

Many payments in clarification could displace the adoption of fresh store stock movements.

A slow payment service must not stop feed progress. The test simulates slow provider calls and observes the feed.

Alternative considered
A global FIFO can accumulate store stock movements behind slow payment calls.
Trade-off
The separate control increases the operating handover.
Reassess
Measured utilization can justify additional processes.

Terms in this step

Bottleneck
A specific location that limits throughput or waiting time and is measured first.
Trade-off
A conscious choice with benefit, accepted disadvantage and observable cause for re-evaluation.

Try it yourself

Assign high waiting time and many unfound original articles to a first measurement and a measure.

A hint for your attempt

More computing power does not update any missing goods departure.

Compare with a possible solution
Waiting time for shut-off
Lock-up time requires measurements of transaction time and competing item accesses; first, long work is removed from the lock.
Missing quantities
Shortages require checking the feed sequence watermark and reconciling shelf stock. First investigate missing or duplicate movements. Measure both changes using the same test profile.

Apply to your project

Which two similar symptoms have different causes in your project?

Step 9 assigns the signals to responsible roles and certificates of completion.