Inside Weibo’s Third‑Generation Backend Architecture: Scalability and High‑Availability
An in‑depth look at Weibo’s evolution to its third‑generation backend system, detailing the orthogonal decomposition model, three‑tier horizontal layering, key middleware such as MCQ, Motan RPC, SSDCache, and the WatchMan tracing platform that together enable high‑availability, massive concurrency, and low‑latency services for billions of users.
Third‑Generation Technical System
Weibo’s third‑generation technical system uses an orthogonal decomposition model, dividing the architecture into a three‑level horizontal hierarchy (interface, service, resource) and four vertical dimensions (business architecture, technical architecture, monitoring platform, service‑governance platform).
Horizontal Layering
The horizontal dimension follows a classic three‑tier model common in large‑scale internet back‑ends:
Interface Layer provides unified APIs for web pages and mobile clients, including core services such as Feed, User Relationship, and Messaging.
Service Layer modularizes core business logic into atomic services (e.g., short‑link, ID generator) and composite services (e.g., Feed, Messaging) that depend on those atoms.
Resource Layer hosts data models, offering caches (Redis, Memcache) and persistent stores (MySQL, HBase, distributed file system TFS, Sina S3).
Dependencies flow strictly from upper to lower layers, ensuring a simple, direct relationship.
Server types correspond to these layers: front‑end machines (API services), queue machines (handling write‑side business logic), and storage nodes (MC, MySQL, MCQ, Redis, HBase, etc.).
Vertical Extension Technical Architecture
As the business architecture matured, the platform built numerous middleware products driven by business needs, forming a comprehensive technical framework that boosts development efficiency and operational stability.
Interface Layer Web V4 Framework
The interface framework standardizes API development, packaging common functions into a Spring‑AOP‑based framework built on Jersey. It defines endpoints via annotations, embeds authentication, rate‑limiting, logging, degradation, and automatic Bean‑JSON/XML serialization, supporting both the monitoring platform and service governance.
Service Layer Framework
The service layer relies heavily on two frameworks: a message queue and an RPC system.
MCQ Message Queue implements a simple FIFO mechanism over Memcache, persisting messages to BerkeleyDB. It accelerates front‑end response times by off‑loading write operations, improves DB batch performance, and feeds real‑time data to search, big‑data, and commercial analytics.
Motan RPC Framework uses Netty as the transport layer, supports Hessian and Java serialization, and offers multiple protocols (Motan, HTTP, TCP, MC). It provides high availability and load‑balancing strategies (FailOver, FailFast, Round Robin, LRU, Consistent Hash) and generates complete call‑chain, performance, and error metrics for robust service governance.
Resource Layer Framework
Key components include an object store and SSDCache.
Object Store serializes arbitrary objects (PB, JSON, binary) into HBase, assigning a unique ObjectID. Objects such as videos, images, and articles are stored in Sina S3, with metadata containing the download URL.
SSDCache introduces an L2 cache layer (Redis/MC + SSD Cache + MySQL) to reduce MC/Redis cost, alleviate DB pressure, and improve I/O performance, leveraging SSD’s superior throughput for distributed caching scenarios.
Monitoring and Service Governance
To manage the growing complexity, Weibo built WatchMan, a large‑scale distributed tracing system inspired by Google Dapper and Twitter Zipkin.
WatchMan collects footprints from every request across services, aggregates performance data, tracks errors and exceptions, and feeds SLA metrics back into flow‑control mechanisms. Its design emphasizes low invasiveness, embedding instrumentation within middleware (interface, RPC, and resource components) without burdening business code.
WatchMan underpins the platform’s monitoring platform and service‑governance capabilities, enabling service scaling, graceful degradation, traffic shifting, and gray‑release deployments.
In summary, the third‑generation technical framework has become central to Weibo’s platform evolution, driving continuous upgrades, efficient product development, and reliable operations.
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.
