How King of Glory Scales: Inside the Backend Architecture of a Top Mobile MOBA

Sun Xun, the technical director of Tencent's King of Glory, details the game's backend architecture, from the evolution of its server design and proxy routing to the shift from TCP to UDP and frame‑synchronization, highlighting challenges, optimizations, and lessons learned in scaling a massive mobile MOBA.

21CTO
21CTO
21CTO
How King of Glory Scales: Inside the Backend Architecture of a Top Mobile MOBA

Sun Xun, technical director of Tencent's King of Glory, presented a comprehensive technical review of the game’s backend at the recent TGDC conference.

King of Glory Game Background

The title evolved from the 2012 PC RTS 霸三国OL , later re‑engineered as a mobile MOBA using Unity, with all code rewritten from scratch.

Insights from BashiGuo OL

Developing the original RTS taught the team valuable lessons about MOBA design, client‑server models, and frame‑sync concepts such as handling reconnection and vision restoration.

Instead of sending full state snapshots on reconnection, the team caches sequential packets and replays them on the client, a method similar to frame sync that reduces bandwidth and complexity.

Overall Architecture

The current backend consists of a Game Hall and PvP servers, linked through a Proxy layer that abstracts the details of numerous processes. Additional components include a Room Server for matchmaking and an Adapter that enables cross‑region and cross‑platform matches.

Servers are grouped by logical “zones”; failures are isolated to specific zones, and automatic shielding and online scaling keep the service stable despite frequent machine outages.

Four major regions (Android‑QQ, Android‑WeChat, iOS‑QQ, iOS‑WeChat) plus a pre‑release server are managed via feature switches, allowing staged updates and isolated testing.

Architecture diagram
Architecture diagram

Post‑Launch Adjustments

After launch the core architecture remained stable, but extensive network optimizations were performed, including CPU‑side performance tuning, latency reduction, and packet loss mitigation.

Proxy routing now balances load, isolates faults, and bridges Hall, PvP, and Room servers without each process needing full topology knowledge.

The Adapter was added to merge Android and iOS players into shared PvP matches once version parity was achieved.

Network Synchronization Scheme

The game switched from a traditional TCP‑based client‑server model to a UDP‑based frame‑sync approach to meet the strict real‑time requirements of a MOBA.

Server collects player inputs every 66 ms (≈15 packets per second) and broadcasts ordered sequences to all clients, ensuring no packet loss and strict ordering.

Clients run deterministic logic without floating‑point operations; any divergence is detected via periodic hash checks, keeping desynchronization rates below 0.03%.

Redundant packet transmission (including the previous three frames) mitigates occasional loss, and adaptive redundancy scales with observed packet loss.

Extensive automated testing, dedicated experience servers, and post‑match replay analysis help identify and fix synchronization bugs quickly.

Monitoring tools track latency, jitter, and bandwidth usage, and future plans include AI‑driven matchmaking to better pair players of similar skill.

Network diagram
Network diagram
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ProxyUDPGame Architecturenetwork synchronizationmobile MOBA
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.