The grouping problem
The matchmaking service takes a stream of players who pressed play and forms them into matches. It must balance three goals that fight each other: skill balance, low latency, and short wait time.
How a queue works
- Players enter a pool tagged with skill rating, region, and preferences.
- The matchmaker repeatedly scans the pool for groups that satisfy constraints.
- Each waiting player has a search window that widens over time, accepting wider skill gaps and farther regions the longer they wait.
This widening is the key trick. Early on it insists on a tight, fair match, but it relaxes rather than leaving someone stuck forever.
Scaling and fairness
- Pools are often sharded by region so latency stays bounded.
- Backfill handles players who leave mid match by slotting in newcomers.
- The service must avoid starvation of rare populations like very high skill players.
Key idea
Matchmaking balances skill, latency, and wait time by widening each player's search window until a fair enough match forms.