Inside Sina Weibo’s Third-Gen Backend Architecture for 100M+ Users
To support over 140 million monthly active users, Sina Weibo evolved from a simple LAMP stack to a sophisticated third‑generation architecture featuring layered interfaces, service and resource tiers, custom RPC and messaging frameworks, SSD caching, and a large‑scale distributed tracing system called WatchMan.
Introduction
In March 2014, Sina Weibo reported 143 million monthly active users and a record 808,298 posts in the first minute of the new year, demanding a highly available, high‑concurrency, low‑latency backend system.
First‑Generation Architecture
The initial platform used a LAMP stack: MyISAM for the database, PHP for the backend, and Memcache for caching.
Second‑Generation Architecture
As the service grew, the architecture shifted to a service‑oriented (SOA) model, replacing PHP with Java and modularizing business functions.
Third‑Generation Architecture
The current system employs an orthogonal decomposition model, forming a 3 × 4 matrix of horizontal and vertical layers.
Horizontal Layers
Interface Layer : Provides unified APIs for web pages and mobile clients, including core services such as Feed, User Relationship, and Messaging.
Service Layer : Divides services into atomic (e.g., short‑link, ID generator) and composite services (e.g., Feed, Messaging) built from atomic components.
Resource Layer : Manages data storage, including Redis, Memcache, MySQL, HBase, distributed file systems, and Sina S3.
Dependencies flow only downward: upper layers depend on lower ones, never the reverse.
Vertical Layers
The vertical dimension adds a technical foundation that supports the business architecture, monitoring platform, and service‑governance platform.
Key Technical Components
Interface Layer – Web V4 Framework
The framework standardizes API development using Spring AOP, builds on Jersey, and provides authentication, rate limiting, logging, degradation, and automatic serialization.
Service Layer Frameworks
MCQ Message Queue : A simple queue built on Memcache protocol with BerkeleyDB persistence, offering high performance and easy monitoring.
Motan RPC : Uses Netty as the transport, supports Hessian and Java serialization, and offers HA and load‑balancing strategies such as FailOver, FailFast, Round Robin, LRU, and Consistent Hash.
Resource Layer Frameworks
Object Store : Serializes objects to HBase with a unique ObjectID, supporting PB, JSON, and binary formats, and stores content in Sina S3.
SSDCache : Introduces an L2 cache (Redis/MC + SSD Cache + MySQL) to reduce cost, increase capacity, and alleviate database pressure.
Monitoring and Service Governance
To trace requests across distributed components, Weibo built the WatchMan tracing system, inspired by Google Dapper and Twitter Zipkin. It collects footprints, performance metrics, errors, and supports flow control, degradation, and automated scaling.
Conclusion
The platform’s evolving architecture—from LAMP to a sophisticated third‑generation stack—drives continuous technical upgrades, accelerates feature delivery, and underpins reliable operation at massive scale.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
