Databases 5 min read

Evolution of MySQL Server Architecture for a High‑Traffic Discuz Site

The article outlines how a Discuz website’s MySQL infrastructure progresses through five stages—from a single‑machine setup for low traffic to multi‑master, read‑write split, and finally sharding and partitioning—to handle daily page views growing from under ten thousand to ten million.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Evolution of MySQL Server Architecture for a High‑Traffic Discuz Site

Assuming a Discuz website grows from a tiny visitor count to ten million daily page views, the MySQL server architecture evolves in several stages.

Stage 1 : When daily PV is below 10,000, a single machine runs both web and database services; no architectural tuning or caching is required, though a simple master‑slave replication may be added for data safety.

Stage 2 : At several tens of thousands of daily PV, the load on a single machine becomes noticeable, prompting separation of web and database servers and the introduction of a memcached cache. MySQL can still run on a single node, optionally with master‑slave replication for safety.

Stage 3 : With daily PV reaching hundreds of thousands, a single MySQL instance strains performance. The architecture shifts to a master‑multiple‑slave cluster to ensure data consistency, using tools such as MySQL‑proxy or Discuz’s built‑in read‑write splitting to direct writes to the master and reads to the slaves.

Stage 4 : When daily PV climbs to a few million, the traditional one‑master‑multiple‑slave setup hits bottlenecks because the master must ship bin‑logs to many slaves, causing latency. The solution is a hierarchical replication: one primary master for writes, a secondary master that feeds numerous downstream slaves, reducing synchronization overhead.

Stage 5 : At ten million daily PV, write traffic overwhelms the single master. The system adopts database sharding (分库分表) by separating high‑traffic modules (e.g., user data, permissions, points) into distinct databases, possibly further splitting large tables. This mirrors the approach used by large Chinese e‑commerce platforms, which partition data by region, buyer/seller, time, etc.

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.

architectureshardingread/write splittingscaling
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

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.