How do you design a global skill-based matchmaking system that prevents grandmasters from stomping novices without making them wait in a 20-minute queue?
An authoritative breakdown of horizontal matchmaking services, constraint relaxation algorithms, and distributed locking for ticket-based lobbies. Use this matchmaking answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects SBMM to the point an interviewer is testing.
What the interviewer is scoring
- Whether they explain the algorithms used to evaluate skill disparity and uncertainty (e.g. Glicko-2, TrueSkill).
- Does the candidate understand how to implement search expansion to relax constraints over time.
- That they design a scalable architecture to hold and process millions of active matchmaking tickets.
- Whether the candidate addresses the challenge of cross-region party matchmaking and server allocation.
- Whether they handle concurrency and race conditions when forming match lobbies.
Answer
Short answer
An authoritative breakdown of horizontal matchmaking services, constraint relaxation algorithms, and distributed locking for ticket-based lobbies.
Treating matchmaking as a database query
The naive approach to matchmaking treats the problem as a simple database query: find ten players where skill == X and ping < 60ms. In a system with hundreds of thousands of concurrent players, a relational database will immediately buckle under the lock contention and complex geospatial querying required. Furthermore, a rigid set of constraints guarantees that high-skill outliers will simply never find a match, waiting indefinitely as the system stubbornly searches for a perfect, impossible pairing.
The ticket-based distributed state
A robust matchmaking architecture requires a ticket-based system stored in an in-memory data grid, such as a distributed Redis Cluster. This provides the microsecond latency required for continuous evaluation.
flowchart TD
A["Client Submits Ticket"] --> B["API Gateway"]
B --> C["Ticket Store (Redis Cluster)"]
C --> D["Matchmaker Worker Pool"]
D --> E{"Evaluate Constraints & MMR"}
E --> |"Match Found"| F["Allocate Game Server"]
E --> |"No Match"| G["Expand Search Parameters"]
F --> H["Notify Clients via WebSockets"]When a search is initiated, a ticket is generated containing the player's Matchmaking Rating (MMR), a measure of skill uncertainty (rating deviation, as seen in Glicko-2 or TrueSkill), and an array of latencies to all available global data centers. A fleet of stateless worker services continuously scans this ticket store. Because evaluating every ticket against every other ticket is computationally suicidal (O(N^2) complexity), the system must utilize spatial indexing, grouping players into localized MMR buckets and geographical proximity cells.
Constraint relaxation and the compromise of fairness
Matchmaking is fundamentally an exercise in managing player frustration. The system must dynamically relax its constraints over time. When a ticket is fresh, the worker strictly enforces narrow MMR variance and optimal ping. As the ticket ages, the algorithm must systematically widen the acceptable skill gap and increase the maximum allowed latency.
This requires a carefully calibrated scoring function that weighs the skill delta against the wait time. If the function is too aggressive, the system matches grandmasters with novices merely because the queue hit three minutes, ruining the match quality. If it is too conservative, queue times skyrocket. Dedicated heuristics must also exist to isolate "smurf" accounts by aggressively inflating their rating deviation when their performance wildly exceeds statistical norms.
The nightmare of pre-made parties
Handling solo players is trivial compared to the chaos introduced by pre-made parties of varying skill levels. A straightforward average of a party's MMR is easily exploited by rank-boosters. The system must calculate a composite MMR that skews heavily towards the highest-skilled player in the group.
Geographical dispersion within a party further complicates server allocation. The matchmaker must evaluate the aggregated latency across all data centers for the proposed lobby and select the one with the lowest total variance, ensuring that the misery of a suboptimal connection is distributed as equitably as possible among the participants.
Collision management in distributed workers
High concurrency guarantees that multiple worker nodes will attempt to claim the same high-quality tickets simultaneously to form different lobbies. Optimistic locking and atomic Redis operations (via Lua scripts) are mandatory to reserve tickets transactionally. If a worker fails to acquire all ten tickets due to a collision, it must instantly abort the lobby formation and release the unreserved tickets back to the pool. Collision retries must be carefully throttled with random backoffs to prevent the worker pool from thrashing itself to death during peak load.
Designing a massive-scale matchmaker is an exercise in managing competing constraints. You must leverage spatial indexing for MMR and latency to avoid exponentially complex search times, implement robust atomic locking to prevent ticket collisions across distributed workers, and carefully tune constraint relaxation to balance match fairness against player queue fatigue.
© 2026 Preptima. Originally published at preptima.com.
Likely follow-ups
- What happens to in-flight tickets if the Redis Cluster node holding a shard fails mid-match-formation?
- How does your constraint-relaxation curve change for a niche game mode with only a few thousand concurrent players instead of hundreds of thousands?
- An engineer's rating-deviation heuristic starts flagging genuinely improving new players as smurfs. How do you detect and correct that false-positive rate?
Related questions
- Design a distributed lock manager for a high-frequency trading platform where microsecond latency is critical and stale locks can result in massive financial losses.hardAlso on distributed-systems and low-latency3 min
- Walk me through applying STRIDE to the boundary where our order service calls the payments service over the network.mediumAlso on distributed-systems4 min
- How do you execute a global CDN cache invalidation for a critical security patch without melting your origin servers under a thundering herd?hardAlso on distributed-systems3 min
- How do you isolate a degraded dependency and halt a cascading failure before thread pool exhaustion takes down the entire microservice ecosystem?hardAlso on distributed-systems2 min