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.

Centralised vs decentralised systems

Clear, exam-focused notes comparing centralised and decentralised systems for blockchain engineers, with definitions, formulas, derivations, examples and common exam mistakes.

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

Key ideas

Note: I define each bold term before using it.

  • Centralised system: a system architecture where one component (the central authority) is responsible for controlling, coordinating or validating operations for the whole system. Assumption: clients trust or rely on the central authority for correctness and liveness.

  • Decentralised system: an architecture where control and validation are distributed across multiple independent components (nodes) and no single node has unilateral control. Assumption: nodes may be independent, possibly adversarial, and the system provides protocols (e.g., consensus) to achieve agreement.

  • Distributed system: a system where computation and state are spread over multiple machines connected by a network. Every decentralised system is distributed; not every distributed system is decentralised (it may still have a central coordinator).

  • Node: a computing participant in the system (server, miner, validator, client). Defined here as an active participant that can send, receive and process messages.

  • Central authority: the node or service that performs authoritative decisions (authentication, ordering, validation) in a centralised design; its failure can stop the whole service.

  • Single point of failure (SPOF): a component whose failure causes the whole system to fail. Centralised designs commonly have an SPOF (the central authority) unless engineered with replication.

  • Consensus: a protocol by which nodes in a distributed or decentralised system agree on a single value or sequence of values. Example consensus properties (standard university form):

    • Agreement: no two correct nodes decide differently.
    • Termination (Liveness): every correct node eventually decides.
    • Validity: if all correct nodes propose the same value v, then v is decided.
    • Integrity (Non-triviality): every correct node decides at most once, and any decided value was proposed by some node (i.e., no spurious decisions). Assumptions: number and type of faults (crash faults vs Byzantine faults), network synchrony (synchronous, partially synchronous, asynchronous). Important impossibility result (FLP): in a purely asynchronous network, no deterministic algorithm can guarantee consensus if even one node may crash.
  • Fault tolerance: the ability of a system to continue operating correctly despite failures of some nodes. For crash faults and independent identical nodes, classical results state: to tolerate f crash faults, we need at least f+1 replicas for availability; for consensus/strongly consistent state-machine replication under crash faults we need at least 2f+1 replicas (quorum majorities); to tolerate f Byzantine faults (arbitrary/malicious), many protocols require at least 3f+1 replicas under partial synchrony for safety and liveness (e.g., state-machine replication with Byzantine fault tolerance).

  • Byzantine fault: arbitrary or malicious behaviour by a node (wrong messages, omission, equivocation). Definition: a node exhibits a Byzantine fault if it behaves in any way not following the protocol, possibly selectively.

  • Message complexity definitions (what universities ask): count of point-to-point messages per operation or per consensus round as a function of n = number of nodes (for the star-broadcast examples below, n denotes the number of non-central leaf nodes).

    • Star (centralised) broadcast: O(n) messages.
    • Full peer-to-peer all-to-all or naive flooding: up to O(n^2) messages due to duplicate forwarding.
    • PBFT-style Byzantine protocols: O(n^2) messages per consensus round (each node communicates with each other node in some phases). Assumptions: counting point-to-point messages, identical message sizes, synchronous exchange per round.

Diagrams to draw for exam answers (describe exactly):

  • Draw 1: Star topology (centralised). Draw a central circle labelled "CA (central authority)" in centre. Draw 6 smaller circles around labelled N1..N6. Draw arrows from each Ni to CA and from CA to each Ni. Label arrows "request" into CA and "response" out. Annotate: message count for broadcast from one node to all others = 1 (node->CA) + (n-1) (CA->others) = n.
  • Draw 2: Mesh topology (decentralised). Draw 6 nodes in a circle labelled N1..N6. Draw lines between every pair (or enough to show fully connected). For broadcast show arrows from N1 to all others (n-1) direct messages. For consensus show arrows between all nodes to indicate O(n^2) messaging.

Derivations commonly required:

  1. Reliability of k replicas in parallel (service available if at least one replica is up):
    • Let p be the uptime probability of each replica, independent.
    • Probability all k fail = (1-p)^k.
    • Therefore availability = 1 - (1-p)^k. (Assumes independent failures and instant failover.)
  2. Probability of majority honest in n nodes:
    • Let q be probability a node is honest (independent). The probability that at least m = ceil((n+1)/2) nodes are honest is sum_{i=m}^{n} C(n,i) q^i (1-q)^{n-i}.
    • (Binomial tail; assumption: independence and identical distribution.)

Formulas

Availability (k replicas) = 1 - (1 - p)^k where p = uptime probability of each replica (unitless, e.g., 0.99). Applies when replicas are independent and any replica can serve.

P_majority_honest = sum_{i=ceil((n+1)/2)}^{n} C(n,i) q^i (1-q)^{n-i} where n = number of nodes (integer), q = probability a node is honest (unitless). Applies under iid node honesty assumption.

Star broadcast messages = n where n = number of non-central nodes (leaf nodes, including the sender; the central authority is excluded). Count: 1 sender->central + (n-1) central->other leaves. Unit: messages per broadcast.

Fully connected direct broadcast messages = n-1 where sender sends direct messages to all other nodes.

Naive flooding worst-case messages = O(n^2) messages (counting duplicates and point-to-point transfers) in a connected network; applies when nodes forward to many neighbours without suppression.

PBFT message complexity ≈ O(n^2) messages per consensus instance. Applies for PBFT-family protocols in leader-based rounds with all-to-all communication.

Worked examples

Example 1 — Availability of centralised vs replicated service Given: single-server uptime p = 0.99. Assumption: service availability means at least one server available to serve requests. Clients availability ignored for the service metric.

  1. Single centralised server availability = p = 0.99. Answer: 0.99.
  2. Three replicated servers (k=3), identical independent uptime p=0.99. Formula: Availability = 1 - (1 - p)^k. Calculation: 1 - (1 - 0.99)^3 = 1 - (0.01)^3 = 1 - 0.000001 = 0.999999. Answer: 0.999999 (99.9999%). This shows replication hugely raises availability; assumption: independent failures and instant failover.

Example 2 — Probability of majority honest Given: n = 7 nodes, each honest with probability q = 0.8, independent. We need P(at least 4 honest) = sum_{i=4..7} C(7,i) 0.8^i 0.2^(7-i). Compute terms:

  • i=4: C(7,4)=35 -> 35 * 0.8^4 * 0.2^3 = 35 * 0.4096 * 0.008 = 0.114688
  • i=5: C(7,5)=21 -> 21 * 0.8^5 * 0.2^2 = 21 * 0.32768 * 0.04 = 0.2752512
  • i=6: C(7,6)=7 -> 7 * 0.8^6 * 0.2 = 7 * 0.262144 * 0.2 = 0.3670016 (~0.3670)
  • i=7: C(7,7)=1 -> 1 * 0.8^7 = 0.2097152 Sum = 0.114688 + 0.2752512 + 0.3670016 + 0.2097152 = 0.966656 Answer: ~0.966656 (96.7%). (This quantifies the chance that a simple majority-based consensus sees the honest majority.)

Example 3 — Message cost comparison (draw diagrams in exam) Given n = 10 nodes.

  • Star broadcast where node A sends a message to all via central authority: messages = 1 (A->CA) + 9 (CA->others) = 10.
  • Direct fully-connected broadcast (A sends direct to all): messages = 9.
  • PBFT-style consensus round (phases with all-to-all): roughly each node sends to all other nodes in one or two phases => messages ≈ c·n(n-1) where c is small constant; for n=10 this is O(100). Interpretation: centralised star shifts load to central CA (lower messages overall but CA must scale), decentralised consensus incurs quadratic messaging.

Common mistakes

  • Forgetting assumptions in formulas: e.g., using 1 - (1-p)^k without noting independence of failures or instant routing/replica discovery.
  • Using simple majority (51%) thresholds for Byzantine tolerance. For Byzantine faults you must consider f and the 3f+1 lower bound for safety under some models — do not mix crash-fault formulas with Byzantine formulas.
  • Mixing message counts and bandwidth: counting messages ignores message size. For example, a single large block broadcast may be expensive even if message count is low.
  • Claiming decentralisation always increases security — it improves resistance to central censorship/failure but can increase attack surface, coordination complexity and latency.

For your exam

Types of questions you will see and what full-marks answers include:

  • Definitions: short precise definitions of centralised, decentralised, consensus, Byzantine fault, SPOF. Bold the term and give a one-sentence formal definition + one-line example.
  • Compare-and-contrast (short notes): list points under headings: control, trust model, fault tolerance, message complexity, latency, throughput, governance and examples (e.g., traditional bank service = centralised; Bitcoin = decentralised/permissionless). Use small diagrams (star vs mesh) and label central authority, nodes and arrows, and annotate message counts.
  • Derivations: derive availability formula for k replicas step-by-step and derive binomial tail probability for majority. State assumptions (independent failures, iid honesty).
  • Numericals: availability computation (use given p and k), probability majority honest (use binomial formula) or message count for broadcast. Carry units (probabilities unitless; messages = count).
  • Short programs/algorithms: trace of a broadcast in star vs peer-to-peer showing message sequences and counts.
  • Diagrams: draw star and mesh topologies, label nodes and arrows, compute messages for a broadcast — show the arithmetic.

A full-marks answer always states assumptions (failure independence, synchrony model), shows steps, uses correct combinatorial coefficients, and interprets results in words (what the number means for design).

Quick check

  1. Define a single point of failure in one sentence.
  2. Give the availability formula for k identical independent replicas and say the assumption needed.
  3. For n=5 nodes with each honest prob q=0.7, write the expression (not numeric) for the probability of majority honest.

Answers: 1) A single point of failure is a component whose failure causes the entire system to fail. 2) Availability = 1 - (1 - p)^k, assumption: replica failures are independent and any replica can serve. 3) sum_{i=3}^{5} C(5,i) 0.7^i 0.3^{5-i}

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

Stuck on something here?