Inside Sina Weibo’s Architecture: Scaling to Billions of Users

During a 2015 tech salon, Weibo platform architect Wei Xiangjun dissected the essence of system architecture, illustrating how Sina Weibo scales to billions of users through multi‑layered services, sharding, CDN, multi‑datacenter caching, orthogonal decomposition, and robust monitoring, offering practical insights for large‑scale backend design.

21CTO
21CTO
21CTO
Inside Sina Weibo’s Architecture: Scaling to Billions of Users

Architecture and My Understanding of Its Essence

Before discussing the essence of architecture, the speaker emphasizes the strategic importance of handling million‑level traffic and the tactical need to respect it. Using Uber as an example, he shows that a seemingly modest QPS of 30 per server can translate to billions of daily requests when multiplied across services.

The talk then defines architecture as an abstraction of repetitive business logic and a forward‑looking design for future expansion, akin to a clothes rack that holds services and algorithms.

Key Capabilities for Architects

1. Abstraction : Eliminate redundancy to improve reusability across functions, classes, services, and templates.

2. Classification : Decouple objects, define service boundaries, and establish clear interfaces.

3. Algorithmic Performance : Optimize CPU, memory, I/O, and network.

Illustrative Examples

• MySQL Sharding : Use a proxy or templating layer to route queries to appropriate databases and tables.

• CDN Acceleration : Network‑level intelligent routing and multi‑level caching improve performance.

• Serviceization : Decompose monoliths into independent services.

• Message Queues : Decouple loosely related subsystems and enable asynchronous processing.

Sina Weibo Overall Architecture

The system follows a three‑tier model: client (Web, Android, iOS), an interface layer, and a backend layer consisting of platform services, search, and big data.

The backend handles data storage, retrieval, indexing, and mining, similar to large e‑commerce platforms.

Evolution of Large‑Site Architecture

From LAMP to service‑oriented architectures, scaling from millions to billions of users requires redesigning the engine while the system remains online.

Key steps include incremental service atomization (user service, messaging, push), stateless design, and data sharding.

Design Principles

1. RPC components. 2. Message middleware for asynchronous decoupling and traffic smoothing. 3. Configuration management for gray releases and graceful degradation.

Statelessness is achieved by moving state to the data layer (cache or DB).

Data‑layer design is critical; poor schema choices lead to costly migrations.

Physical‑to‑logical mapping aligns teams with technical domains for better collaboration.

Multi‑Level Caching Architecture

Weibo employs a two‑level cache (L1 and L2) across dual data centers, providing high QPS and low‑cost bandwidth scaling.

Cache sizing is driven by user‑access patterns to minimize database penetration.

Dual‑datacenter deployment offers hot‑standby redundancy and locality‑aware routing.

Feed Storage Architecture

Posts are stored in MySQL with per‑day tables and two‑level indexing (user‑based and time‑based) to support efficient timeline generation.

Sharding by user ID and time separates hot and cold data, preventing table explosion.

Distributed Service Tracing System

At massive scale, tracing across RPC calls requires a unique request ID propagated through all services, enabling end‑to‑end monitoring with minimal intrusion (e.g., AOP in Java).

Standardized logs across heterogeneous languages facilitate cross‑service diagnostics.

Operational Measures for Peak Events

1. Pre‑defined degradation plans with priority ordering. 2. Full‑stack load testing at 5‑10× normal traffic. 3. Shared Docker clusters for on‑demand resource scaling.

Conclusion and Learning Path

Continuous learning is essential: master Java, then the JVM, operating systems, design patterns, TCP/IP, distributed systems, data structures, and algorithms.

The speaker encourages building a personal set of architectural principles through practice and reflection.

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.

Performance OptimizationBackend ArchitectureScalabilitycachingservice-oriented architecture
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.