Game Development 9 min read

WeChat Mini-Game Architecture Design and Development Guide

The guide outlines a scalable, globally unified architecture for WeChat mini-games—combining stateless compute layers with CLB, auto-scaling, a star-router model for peer communication, and horizontally-sharded storage using Tencent Cloud’s DCDB or TCaplus to handle rapid viral growth.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
WeChat Mini-Game Architecture Design and Development Guide

This article discusses the technical architecture and development direction for WeChat mini-games, presented by Tencent Cloud's senior architect Yu Guoliang.

Key Characteristics of WeChat Mini-Games: The most significant features are decentralized distribution and social friend chain propagation. This brings both opportunities (potential for viral hits) and challenges (previous experience may not apply, including technical aspects).

Architecture Requirements: Two key requirements emerge: 1) Global unified server architecture to fully leverage WeChat's social network; 2) Online scaling capability, as any game could become a hit with exponential growth on the WeChat platform.

Case Study: A real Tencent Cloud client experienced rapid growth from tens of thousands to 2 million users within a short period. They faced bottlenecks: initial traffic scaling through cloud hosts, then database scalability issues requiring migration to cluster database solutions.

Compute Layer Architecture: A stateless layered architecture is recommended. Client requests flow through CLB (Cloud Load Balancer) → Anti-DDoS protection → backend services. CLB supports over 120 million concurrent connections, handles 40GB/S peak traffic, and processes 600 million packets per second. Auto Scaling (AS) service can expand 1,000 cloud hosts in 63 seconds on average.

Star Architecture: To address limitations of stateless architecture (inter-node communication, session affinity), a star architecture with routers enables peer-to-peer communication between nodes. Routers handle connection aggregation, object routing, load balancing, and broadcasting. The architecture supports horizontal scaling by adding new nodes and routers.

Storage Layer Design: Three approaches for horizontal database scaling: 1) Incremental range-based allocation (easy scaling but performance hotspots); 2) Hash-based distribution (no hotspots but difficult to add nodes); 3) Hybrid approach requiring data routing middleware.

Recommended Products: Tencent Cloud's DCDB (distributed database) uses proxy layer to abstract complexity, supports linear performance scaling with CPU cores, and enables automatic data migration for扩容. TCaplus supports Protobuf interfaces, combines cache with storage, and handles unlimited storage space with single table support up to PB scale. TCaplus powers hundreds of Tencent games including Honor of Kings and PUBG Mobile.

Distributed SystemsGame developmentauto scalingTencent Cloudcloud infrastructureWeChat Mini GamesDatabase ClusteringGame Architecture
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login 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.