What does 'server-authoritative' mean in a multiplayer game, and why does it matter for QA?
JuniorThe server is the single source of truth for all game state; the client renders what the server says happened, never self-reports an outcome. For QA it means every state-changing action must be validated server-side, not just in the UI.
// What interviewers look for
That the candidate understands the trust boundary: the client is untrusted and any state it self-reports must be rejected or verified. Strong answers connect this to concrete test cases — client-only state, forged deltas, and rollback under desync.
Common pitfall
Describing it as a performance or latency pattern rather than a security and correctness boundary. Missing that the implication for QA is testing server rejection of invalid client input, not just happy-path rendering.
Model answer
Server-authoritative means the server owns the canonical state of the game — positions, health, scores, inventory — and the client only renders what the server confirms happened. The client can predict and display locally for responsiveness, but if the server disagrees, the server wins. For QA, the practical implication is that every outcome I care about must be tested at the server layer, not just observed in the UI. I'd test that the server rejects impossible state transitions: a client reporting a health value above its maximum, a position delta that would require teleportation given the elapsed time, an item pickup when the client was out of range. I'd assert that when the client and server desync — network partition, clock drift — the server's version wins on reconnect and the client is corrected, not the server. The anti-pattern I'm guarding against is a server that accepts whatever the client sends, which turns every player into a potential cheater. I'd cover this at the API level, not just through the game client, because the attack surface is the server endpoint.