Skip to content
SEE Exam Prep

Question 9 of 11 · PYQ 2025 · 12 marks

Open in ChatGPT

Briefly explain the Architectures of Distributed Systems. List out pros and cons of distributed systems.


Introduction

A distributed system's architecture describes how its components are arranged and how they interact. Several styles recur, and each is a trade of coupling against scale.

Architectures

  1. Layered. Each layer uses only the one below: presentation, application, data. Easy to reason about; a request crosses every layer.
  2. Client-server. Clients request, servers provide. Simple, centralised authority, but the server is a bottleneck.
  3. N-tier. The client-server idea with the application and data tiers separated, each independently replicable.
  4. Object-based. Components are objects called remotely through a broker (CORBA, RMI). Location-transparent, at the cost of a broker.
  5. Data-centred (repository). Components share one store and communicate through it. Strong consistency for free; the store is a single point of contention.
  6. Event-based (publish-subscribe). Publishers emit events, subscribers react. Loose coupling and easy fan-out; no one knows the end-to-end flow.
  7. Peer-to-peer. Every node is both client and server. Scales with the participants; hard to guarantee anything.
  8. Microservices. The object-based style at process granularity: small services, independent deployment, network calls between them.
  9. Hybrid. Client-server in front, peer-to-peer behind (BitTorrent tracker plus peers), or a layered API over an event bus.

Diagram

ClientsEdgeApplication tierData tierBrowserLoad balancerWeb server 1Web server 2PrimaryReplica

Pros of distributed systems

  1. Scalability: capacity grows by adding nodes.
  2. Fault tolerance: a failed node is replaced by a replica.
  3. Resource sharing: storage, printers, compute shared across users.
  4. Locality: computation and data can sit near the user.
  5. Incremental growth: a small cluster today, a large one tomorrow.

Cons

  1. Complexity: partial failure, no global clock, no shared memory; every call can fail.
  2. Consistency cost: keeping replicas aligned needs coordination, which costs latency.
  3. Security surface: every node and every link is an attack surface.
  4. Operational overhead: deployment, monitoring and debugging span many machines.
  5. Latency: a network hop is orders of magnitude slower than a memory read.
  6. Debugging: a request crosses several services, so observability (traces, correlation ids) becomes mandatory.

Conclusion

The architectures differ in where they put the coupling: layers in the code, a broker between objects, a store between components, events between services. Every one of them buys scale and pays for it in partial failure, which is the defining cost of a distributed system.