liveBook · Manning

Distributed system

As explained in Acing the Frontend Interview

Distributed computing is computation performed by multiple networked machines that coordinate to provide a combined service or result.

A distributed system uses multiple machines that communicate over a network to deliver a service. For a frontend engineer, the consequences can appear as API behavior, slow requests, inconsistent data, or failures that affect only part of an application. Understanding those consequences helps with end-to-end design and conversations with backend teams. section 6.0 section 6.6

Deployment matters more than the number of layers in an architecture diagram. An n-tier application is distributed when its tiers run on separate machines and communicate over a network; separate layers alone do not make it distributed. Microservices are inherently distributed, but their independent deployment and scaling come with orchestration and monitoring costs. section 6.1

Table 6.2 Architectural models compared
Architecture
Pros
Cons
Use cases
Monolithic
Simple to build, test, and deploy. Fewer moving parts.
Hard to scale, maintain, or modernize as app complexity grows.
MVPs, early-stage products, internal tools.
3-Tier
Clear separation of concerns (UI, logic, data). Enables modular design.
Limited flexibility with cross-cutting concerns like auth and logging.
Traditional web apps with REST or GraphQL APIs.
N-ter
Better scalability and specialization. Supports cross-cutting concerns.
Increased complexity and potential latency between layers.
Enterprise systems, regulated or mission-critical apps.
Microservices
Team autonomy, independent deployment, horizontal scaling.
Requires orchestration, monitoring, and distributed system expertise.
Large SaaS platforms, high-scale distributed systems.

Compare the scalability and complexity trade-offs of monolithic, tiered, and microservices architectures. section 6.1

In a design interview, connect each choice to a requirement or failure scenario:

  • During a network partition, explain the trade-off between returning a response and guaranteeing that a read reflects the latest write. Choose a consistency model according to the application’s needs. section 6.2
  • For growing traffic, contrast adding resources to one machine with adding instances. Horizontal scaling improves elasticity and fault tolerance but requires load balancing and attention to state. section 6.3
  • For reliability, explain how nodes communicate, how replication affects write latency and consistency, and how metrics, logs, traces, and health checks expose failures. section 6.6

A frontend-to-API boundary

Suppose a UI and its API run on different origins. The browser’s same-origin policy prevents frontend JavaScript from reading the API response unless the backend permits it with CORS headers. A good answer identifies which service sets those headers and checks how credentialed requests are handled, rather than treating the problem as a React-only bug. section 6.1

The useful takeaway is not that every service should be distributed. Be ready to say where the network boundary lies, which scaling or consistency guarantee matters, and how the system will reveal and handle failures. section 6.1 section 6.2 section 6.6

How Acing the Frontend Interview covers it

How deep it goes
Explains architectural boundaries, CAP trade-offs, scaling, replication, and observability through questions and applied choices rather than a complete system build.
Examples
Uses a cross-origin frontend and API, partition scenarios, horizontal scaling, and synchronous versus asynchronous replication.
What it assumes
Assumes familiarity with frontend applications and APIs while establishing distributed-computing fundamentals.
What you can do after
Evaluate/understand distributed architecture choices and explain their consistency, scalability, and reliability trade-offs in an interview.
How it connects
Connects microservices, n-tier architecture, CAP theorem, consistency models, load balancing, replication, and observability.

Also explained in

Compare how 19 books explain distributed system →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.