← Lessons

quiz vs the machine

Gold1460

System Design

Queue Based Admission Control

Letting buyers in at a rate your backend can handle.

5 min read · core · beat Gold to climb

Why admission control

When demand exceeds capacity, you can either drop requests randomly or shape them into a queue and admit at a controlled rate. A virtual waiting room turns a stampede into an orderly line.

How it works

  • Arriving buyers receive a position token and wait outside the protected system.
  • A scheduler releases tokens at the rate the checkout system can absorb.
  • Released buyers get a short access window to complete checkout before their slot is reclaimed.

Fairness and abuse

  • First in first out feels fair but invites bots; add light verification.
  • Cap the window so an idle admitted user does not block the line.
  • Make position tokens single use so they cannot be shared.

Key idea

Admission control shapes excess demand into a queue and releases buyers at a rate the backend can absorb, trading wait time for stability and fairness.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the goal of admission control?

2. Why give an admitted buyer only a short access window?