</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 11: The Engine in the Other Tab - Fair Play & Security

Executive Summary: The authoritative server already rules out illegal moves, forged clocks and forged results. What's left is a human copying an engine, plus rating manipulation, and we catch both after the game. The Fair-Play Pipeline reads game-ended and runs three tiers: features on all 8M rated games a day, a quick engine pass at 20 ms/ply, and deep analysis of the top 2% at 1 s/ply, ~300 cores in all, plus human review. It judges accounts, never single games, so Omar's 97% accuracy in g_8Kd2 proves nothing by itself. Bans close the account and refund rating to the people the cheater beat. Prize events add real-time scoring and a 60 s spectator delay.

Section 10 kept the system alive through crashes. The interviewer changes the question: "Your machines are honest now. Your players aren't. What's your threat model?"

What We're Defending Against

Threat What it looks like Primary defence
Engine assistance An engine in another tab, moves copied by hand Tiered post-game pipeline, judged across many games
Rating manipulation Sandbagging down to enter weaker events; farming wins from a second account Eligibility rules, pair-frequency flags
Account takeover A stolen login playing rated games OIDC login, short-lived tokens, play-pattern signals
Tampered clients Fake times or impossible moves Server authority, gateway timekeeping
Abusive chat Harassment Reports, mute, minimal chat by design
DDoS Floods at the gateways Edge protection, per-IP and per-account limits

You: "Start with what's already solved. The client sends four characters and a ply number; the game server checks legality and owns the result and the clock. Think time is stamped at the player's own gateway, and the lag credit is that gateway's own measurement of the socket: the kernel's smoothed RTT from TCP_INFO, cross-checked with app-level pings, capped at 200 ms. A page script can't set it directly, and slowing your own network buys at most 200 ms a move. A tampered client can't move a knight like a bishop, add time to its clock or report a win it didn't get. So everything that's left is one question: is a human choosing these moves, or an engine?"

Key Insight: Server authority turns cheating from an engineering problem into a statistics problem.


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.