Scale estimates
Why is a good average not enough for the last article?
The rules are there; now we set a computable scale for their test. Suppose ten stores with 300 orders each day, an average of 20 order lines per order and twelve hours of order picking. These figures are deliberately chosen test assumptions. The average spreads work throughout the day; a simultaneously in-demand article focuses it on an inventory line.
Starting point The handover requirements from step 2 must also apply under simultaneous requests.
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 daily volume to hotspot
Illustrative scale · Rate, test peak and contention separately
28 order-line completions per second test load. 50 concurrent allocations for one pack test domain uniqueness.
Calculations for the first test
- 01
Orders per day
3,000 orders/day10 stores × 300 orders
For the designThe test distributes the daily volume among ten stores.
- 02
Order lines per day
60,000 order lines/day3000 × 20 order lines
For the designOrder line closures determine the local write rate.
- 03
Average rate
1.3889 order-line completions/s60,000 ÷ (12 × 3,600)
For the designThe mean value describes the base load during twelve hours of picking.
- 04
Test peak
28 order-line completions/s20 × 1.3889 = 27.7778; rounded up
For the designThis profile checks the goal from step 2.
- 05
15-minute test
25,200 order-line completions28 × 900 seconds
For the designThe volume makes the peak test reproducible.
- 06
Raw data
117.19 MiB/day; around 3.43 GiB/30 days60,000 × 2 KiB = 120,000 KiB; × 30
For the designIndices, payments, backups and longer storage are added.
- 07
Article Hotspot
50 requests for 1 pack50 parallel allocations at P=1, Z=0
For the designExactly one commit wins; 49 requests get a conflict.
Case decision and verification approach
Use a relational transaction store with short item-level locks.
Moderate total load encounters short competing changes to the same item row.
Stock and allocation must remain consistent together. Test 28 order-line completions per second and, separately, 50 concurrent requests with exactly one winner.
- Alternative considered
- Separate inventory and order record stores require additional reconciliation of the promise.
- Trade-off
- A popular article serializes accesses.
- Reassess
- Only measured waiting times under the real peak profile justify further distribution.
Terms in this step
- Average
- The order-line rate spread over twelve hours.
- Test peak
- Twenty times the load profile for 15 minutes.
- Article Hotspot
- Many simultaneous allocations to the same last pack.
Try it yourself
Calculate the average order-line rate, the peak profile at twenty times that rate, and the winning outcome for 50 concurrent requests for one pack.
A hint for your attempt
The rate and number of successful promises measure different things.
Compare with a possible solution
- Average rate
- 60,000 ÷ 43,200 gives about 1.39 order-line completions per second.
- Test peak
- Twenty times the mean is about 27.8 completions per second; round up to 28 per second for the test profile.
- Article Hotspot
- Exactly one allocation wins and 49 requests get a conflict; high throughput must not generate a second winner.
Apply to your project
Which single item concentrates contention in your project?