Architecture Evolution and Microservice Practices at Toutiao
The article examines the pressures on Toutiao's architecture, outlines its three-stage evolution from a simple three‑tier system to a split architecture and finally microservices, and details the service‑registration, authorization, and custom RPC framework that enable rapid, reliable backend development.
From an architectural perspective, the technical team at Toutiao faces three main pressures: service stability, iteration speed, and service quality, all of which are critical for maintaining user satisfaction and handling rapid growth.
The company’s rapid four‑year expansion has created significant stability and scalability challenges, prompting frequent incidents such as service crashes during high‑traffic events and performance bottlenecks.
Architecture evolution is a continuous process with three historical stages:
Stage 1 – Three‑Tier Structure: A simple web application backed by a database, sufficient for early low‑QPS traffic.
Stage 2 – Splitting: As traffic grew, monolithic code was split into separate business services (A, B, C), introducing the need for careful migration and integration.
Stage 3 – Microservices: The current strategy decomposes large applications into smaller, reusable subsystems with a shared infrastructure layer, aiming for faster iteration, resilience, and easier maintenance.
Microservice design emphasizes three key principles: decoupling services, keeping them lightweight to reduce maintenance cost, and ensuring easy management.
Implementation details include:
Establishing global service registration (e.g., Consul) with a standardized naming convention {product}.{subsystem}.{module} .
Using Thrift for interface definition and enforcing standard parameters for strong type safety.
Providing a unified RPC library, and treating infrastructure components such as Nginx, Redis, and MySQL as services.
The service center stores metadata (QPS limits, ownership, resource allocation) and supports authorization, allowing only pre‑authorized services to invoke each other, which improves security and simplifies impact analysis.
Authorization mechanisms combine service identifiers, IP‑based controls, and, where possible, Docker‑level identity, enabling fine‑grained access control and efficient alert routing.
Toutiao also developed an internal RPC framework with features such as rapid code generation, service discovery, observability (logid, pprof, admin ports), disaster‑recovery fallbacks, overload protection (circuit breakers, rate limiting), and multi‑language support (Python/Go).
Overall, the architecture aims to provide a private cloud platform where infrastructure is managed centrally, allowing business teams to focus on product development while benefiting from shared services, automated scaling, and robust monitoring.
Architects' Tech Alliance
Sharing project experiences, insights into cutting-edge architectures, focusing on cloud computing, microservices, big data, hyper-convergence, storage, data protection, artificial intelligence, industry practices and solutions.
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.