Three Common System Architecture Patterns Every Backend Engineer Should Know
This article introduces three widely used system architecture designs—single‑database single‑application, content distribution with CDN/OSS, and read‑write separation with master‑slave databases and Elasticsearch—detailing their structures, advantages, disadvantages, and typical usage scenarios.
Common system architecture designs, focusing on three patterns:
1. Single‑Database Single‑Application Architecture
This simplest design has one database, one business‑logic layer, and optionally a back‑office system. All business logic runs in the application layer and all data is stored in a single DB. Advantages: simple structure, fast development, suitable for prototypes. Disadvantages: poor performance, no high availability, limited scalability.
2. Content Distribution Architecture
Widely used by large websites, this pattern adds a CDN and cloud object storage (OSS) to distribute static resources (HTML, CSS, JS, images) close to users. The typical flow for uploading and viewing an image involves uploading to OSS, storing the URL in the business DB, and using intelligent DNS to resolve the nearest edge server.
Advantages: fast resource download, reduced backend storage pressure, lower bandwidth usage. Disadvantages: OSS/CDN costs, potential consistency and update latency issues.
3. Read‑Write Separation Architecture
Designed to alleviate pressure on a single database by separating write operations to a master DB and read operations to one or more replica DBs, often combined with Elasticsearch for full‑text search. This improves read scalability and supports high‑concurrency queries, but introduces data latency and consistency challenges.
Typical use cases include full‑text keyword search using Elasticsearch and high‑frequency ordinary queries where read‑write separation distributes load across master‑slave databases.
Pros: reduces database load, theoretically unlimited read performance, supports specialized query and indexing solutions. Cons: data delay and consistency guarantees.
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.
