Tencent Architect's Decade of Insights: Simple, Evolvable Architecture Principles
A Tencent architect with nearly ten years experience shares principles for simple, evolvable architecture: modularization, layering, focusing on core business needs like QQ's social chat, avoiding premature optimization, service design with monitoring and canary releases, and code design with clear structure and single responsibility.
A Tencent architect with nearly ten years of experience summarizes key architectural principles: good architecture should be simple and evolvable.
Simple Architecture
Simple architecture means low cost and low risk, achieved through:
Reasonable modularization: low coupling, building large systems as small, independent pieces.
Reasonable layering: clear separation of concerns.
Maintainability: easy to understand and modify.
Evolvable Architecture
Evolvability means the system can adapt to business growth at low cost and risk. The author illustrates with QQ: its core need is social chat. Regardless of how the business expands, the focus remains on the relationship chain and chat system, prioritizing availability, stability, scalability, and performance. Good architecture enables horizontal scaling to handle data and request growth.
Note: Avoid premature optimization. Implement functionality first, launch quickly, then optimize critical paths based on monitoring data.
Service Design
Good service design is simple, well-monitored, and supports canary releases.
Reuse over reinvention: First check for mature, reusable, controllable solutions before designing new ones.
Context-driven decisions: Business backend design depends on understanding entry points, user volume, read/write ratios, data scale, and availability requirements. These factors determine choices like async vs. sync, multi-thread vs. multi-process, NoSQL vs. MySQL, caching, read/write separation, etc.
Comprehensive monitoring: Monitor business scale, machine health, code errors and exceptions, complex logic, and key log information. Every metric should clearly indicate whether the service is abnormal and how to respond.
Canary upgrades: Essential for massive backends. Service design and deployment should avoid binary (0/1) choices; canary focuses on risk control during releases.
Code Design
Good code design is layered and easy to understand:
Clear directory structure separating referenced libraries from own code; file names match functionality.
Class design follows reasonable layering.
Naming matches behavior; follow "do one thing and do it well"; add comments for complex logic.
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.
Java Captain
Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.
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.
