AlgoViz

Flash-sale inventory and admission

medium 4 min

A waiting room bounds traffic reaching inventory.

Video lesson · Chapter 1 of 5

One thousand items, a longer line

0:00 / 3:50

A queue ticket is not a reservation

1:15Reel

Theory

Read or listen first. About 1 min.

What it is

A flash sale poses two different counting problems. The queue limits the number of buyers reaching checkout. Inventory records determine how many units can still be sold.

A queue ticket and a stock reservation

Arrivals10,000 buyers10,000 ticketsUnits for sale100 unitsA queue limits pressure on the stock service.
Ten thousand buyers can receive queue positions while only 100 units exist. A ticket orders arrivals and carries no stock guarantee.

Why it exists

Even a small admitted group can converge on one item. A conditional claim at the stock owner protects that item when many buyers select it at once.

Words to know

Admission control
A policy that limits how much work may enter a system during a given interval.

How it works

Step through the idea, or press Play.

Step 1 of 3

Queue the burst. The waiting room limits concurrent attempts.

Understand it

Worked example

Flash-sale inventory and admission in practice

Ten thousand buyers arrive for 100 copies. If 100 admitted buyers all choose the same copy, admission alone still allows a race. Use conditional inventory claims and release only the matching expired hold.

Related case

Who gets the last reservation?

A library releases a limited print edition at noon. Thousands see one copy available. A customer can reserve it for two minutes while checking out.

Two readers at the library desk
One copy at the library deskAdaticket ACopy 8availableBowaitingBoth readers see one copy

Compare item, owner, state and deadline.

Sources