Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

System architectures: centralised, decentralised and hybrid

Compare centralised, decentralised (peer-to-peer) and hybrid system architectures: definitions, pros/cons, exact availability formulas and derivations, diagrams to draw, worked numerical and trace examples, common mistakes and exam guidance.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Two or three sentences: where an engineer uses this. Distributed systems engineers choose an architecture (centralised, decentralised, or hybrid) when designing services such as web services, cloud back-ends, content distribution, and peer-to-peer applications. The choice affects scalability, fault tolerance, latency and operational cost; knowing the trade-offs helps you meet non-functional goals and pass design/analysis questions in exams.

Key ideas

Start by defining basic terms before they are used.

  • Node: a single computing entity (machine, VM, or process) in the system. A node can be a client (requests services) or a server (provides services).
  • Client: a node that initiates requests to obtain service or data.
  • Server: a node whose role is to respond to client requests and provide resources or data.
  • Coordinator: a server responsible for control tasks (e.g. leader in replication).
  • Replica: a copy of data or service state on a different node.
  • Availability: the probability that a component or system is operational at a given time (no units, expressed 0–1 or %).
  • Scalability: the ability of a system to handle increased load by adding resources.
  • Fault tolerance: the ability to continue operating correctly in the presence of faults.

Architectures (exact definitions):

  • Centralised architecture: a design where a single or a few well-defined servers perform the main tasks (control, storage, coordination) and clients interact with those servers. Assumptions frequently made: client/server roles are distinct; the central server(s) is a potential bottleneck and single point of failure if not replicated.
  • Decentralised architecture (peer-to-peer): a design where nodes have symmetric roles; each node may act as client and server and there is no single coordinator controlling the whole system. Assumptions: nodes communicate directly, control and data are distributed, and cooperation provides global service.
  • Hybrid architecture: a design that combines centralised and decentralised elements, for example a hierarchical system where local clusters have central servers but clusters themselves interconnect in a P2P way, or systems with central directories and decentralized storage. Assumptions: parts of system may rely on central components and other parts on distributed mechanisms.

Important theorems / laws and derivations often required in exams:

  1. Availability of components combined in series (all must work): Exact statement: If components 1..n must all be operational for the system to be operational and failures are independent, then system availability A_system = A_1 × A_2 × … × A_n. Assumptions: component failures independent; availability defined as steady-state probability of being up. Derivation (step-by-step): for two components A and B with independent up-probabilities A_A and A_B, the probability both are up = P(A up ∧ B up) = P(A up)·P(B up) = A_A · A_B. Extend by induction to n components.
  2. Availability of components in parallel (at least one must work): Exact statement: If system is up when at least one of n components works and failures are independent, then A_system = 1 − Π_{i=1..n} (1 − A_i). Assumptions: independent failures. Derivation: system is down only when every component is down. Probability every component down = Π (1 − A_i). Therefore A_system = 1 − Π (1 − A_i).
  3. Scaling of request handling in common topologies (informal but exact complexity statements often required):
    • Star (central server): per-request service path length is O(1) from client to server; server must handle O(N) clients so central bottleneck. State the assumption: single coordinator handles all requests.
    • Flooding/broadcast on an overlay graph: message complexity O(N+E) where N is nodes and E is overlay edges; on a fully connected overlay E = Θ(N^2), so total messages are Θ(N^2). This gives high redundancy but poor scalability.
    • Structured P2P (example Chord): lookup complexity O(log N) hops (state exact assumption: finger tables of size O(log N)). Note: details of Chord belong to Distributed hash tables topic; here refer to structured P2P as giving logarithmic lookup with additional routing state.

Diagrams (what to draw and label):

  • For centralised: draw a star. Draw a central labelled box "Server / Coordinator" in the middle, draw multiple small circles around labelled "Clients", draw arrows from each client to the server labelled "requests/ responses". Annotate "single point of failure" at the central box and "bottleneck".
  • For decentralised: draw many circles connected in a mesh; label several as "Peer (client+server)". Show arrows directly between peers; annotate "no single coordinator" and "replication, locality-dependent".
  • For hybrid: draw clusters (small stars) connected as peers: inside each cluster a central node labelled "local server" connected to local clients; clusters connected by peer links. Annotate "local centralisation + inter-cluster decentralisation".

Key trade-offs (exact points students should memorise):

  • Centralised: simpler to implement and enforce strong consistency; poor scalability and single point of failure unless replicated.
  • Decentralised: good scalability and fault tolerance; harder to ensure global consistency and to coordinate updates.
  • Hybrid: balance between manageability and scalability; can reduce coordination traffic while keeping some central control.

Formulas

Each formula on its own line, then definitions. A_system_series = Π_{i=1..n} A_i

  • A_system_series: availability of system where all n components must be up. A_i: availability of component i (unitless, 0–1). Applies when component failures are independent.

A_system_parallel = 1 − Π_{i=1..n} (1 − A_i)

  • A_system_parallel: availability of system where any one of n components being up suffices. A_i as above. Applies when failures independent.

Message_hops_star = 1 (client → server) or 2 (client → server → client)

  • Number of network hops per request in a star (centralised) topology. Unit: hops. Assumes direct client-server link.

Message_complexity_flood = O(N + E)

  • N: number of nodes, E: number of edges in overlay. Unit: messages. Applies to flooding/broadcast algorithms.

Lookup_hops_structured = O(log N)

  • N: number of nodes. Unit: hops. Applies to structured P2P overlays with O(log N) routing state (e.g., Chord-style). Verify details under DHTs.

Availability_from_repairs = MTTF / (MTTF + MTTR)

  • Availability_from_repairs: steady-state availability under repair. MTTF: mean time to failure; MTTR: mean time to repair. Unit: availability (0–1). Applies when failures and repairs yield alternating up/down periods in steady state.

Worked examples

Example 1 — Numerical availability comparison (exam-style) Problem: A simple service can be deployed as a central server with availability 0.99, or as three replicas deployed in parallel where each replica has availability 0.98 and the system is up if at least one replica is available. Compute the system availability for both designs and compare. Solution (numbered steps):

  1. Centralised availability: single server availability A_c = 0.99. Final answer: 0.99 (99%).
  2. Replicated (parallel) availability: use A_system_parallel = 1 − Π (1 − A_i). Formula before numbers: A_r = 1 − (1 − 0.98)^3.
  3. Numerical substitution: 1 − (0.02)^3 = 1 − 8·10^(−6) = 0.999992.
  4. Convert to percentage: 0.999992 × 100 = 99.9992%.
  5. Final answer (bold): Centralised: 99.00% ; Replicated (3 × 0.98): 99.9992%. Comment: replicas greatly improve availability under the independence assumption.

Example 2 — Trace of a client request in two architectures (step-by-step) Problem: Describe the sequence of network messages when client C wants data item X in (a) centralised architecture and (b) decentralised P2P with flooding cache discovery. Solution (a) Centralised (star):

  1. C → server: GET X (request).
  2. Server checks local storage; if present, server → C: DATA X. If not present, server may fetch from back-end storage and then reply. Annotate: 2 network hops total for non-cached reply (client→server→client).

Solution (b) Decentralised (flooding discovery):

  1. C checks local cache; miss.
  2. C sends QUERY(X, TTL) to its neighbours (one message per outgoing edge).
  3. Each neighbour checks local cache: if found, replies with DATA X back to C via reverse path; if not and TTL>0, forwards QUERY to its neighbours (except where it received from), decrementing TTL.
  4. When a reply arrives, C may cache the item. Annotate message complexity roughly proportional to number of nodes reached by TTL.

Example 3 — Model exam answer (short note) (theory) Question: Give a short note contrasting consistency and availability in centralised vs decentralised systems. Model answer (concise): Centralised systems, with a single coordinator, can implement strong consistency easily (single serialization point) but suffer reduced availability if that coordinator fails. Decentralised systems improve availability by removing the single point of failure and by replication, but must use distributed consistency protocols (more complex) and often settle for weaker consistency under partition to maintain availability (CAP trade-offs). Mention protocols and topics: replication, consensus (Paxos/Raft), and the CAP theorem (reference these topics by name).

Common mistakes

  • Saying decentralised always has better consistency — actually decentralised makes strong consistency harder, not impossible.
  • Confusing node count N with message complexity; for example, claiming flooding is O(1).
  • In diagrams: not labelling roles (client/server/peer) clearly or failing to mark single point of failure in centralised diagrams.

For your exam

Kinds of questions and what full-marks answers include:

  • Definitions: give short, precise definitions and one-line assumption (e.g., centralised: single coordinator; assume single role separation).
  • Short notes: list advantages and disadvantages with one example use-case for each architecture.
  • Derivations: show step-by-step derivation of availability for series/parallel (write assumptions about independence).
  • Numericals: convert percentages to probabilities (0–1), show formula, substitute numbers, show arithmetic and final percentage.
  • Diagrams: draw the topology requested (star, mesh, hierarchical), label nodes and annotate bottlenecks/failures.
  • Design questions: justify choice of architecture using scalability, fault tolerance, latency, cost, and consistency requirements; reference relevant protocols (consensus, replication) by name.

Quick check

  1. Define centralised architecture in one sentence.
  2. Write the formula for availability when a system works if any of 4 independent replicas is up (use A for each replica availability).
  3. In a star topology, which component is the single point of failure and why? Answers: 1. A system design where a single server or small set of servers performs control and service for clients (single coordinator). 2. A_system = 1 − (1 − A)^4. 3. The central server (coordinator) because all client requests route through it, so its failure disables the service.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?