liveBook · Manning

Chapter 1: Thinking in distributed systems: Models, mindsets, and mechanics

What you will learn in chapter 1 of Think Distributed Systems

The chapter introduces distributed systems as interacting components and explains why engineers need them to build applications that remain functional under load and failure.

After this chapter you will be able to

Section by section

Introduction

The chapter introduces distributed systems as interacting components and explains why engineers need them to build applications that remain functional under load and failure.

Key terms: distributed system, components, messages, network, emerges, correctness, scalability, reliability, load, failures

1.1 Software engineering and mental models

This section frames accurate, concise mental models as a way to replace confusion with confident reasoning about distributed systems, and distinguishes knowing facts from understanding how to use them.

Key terms: mental model, accurate, concise, reason confidently, knowing, understanding, dependable mental models

1.1.1 Mental models: The foundation of reasoning

Defines mental models as internal representations used to understand and communicate about systems, then distinguishes a model’s correctness from its completeness.

Key terms: model, mental model, target system, ground truth, perceived truth, correctness, completeness, falsehoods, omissions, relevant facts

1.1.2 Correct mental models

Defines a correct mental model as one whose stated facts match the system it represents.

Key terms: correct mental model, fact of the model, fact of the system

1.1.3 Complete mental models

Completeness means a mental model includes all facts relevant to the question being asked, not every fact about the system.

Key terms: completeness, relevance, luminous efficiency

1.2 Mental model of software systems

The section explains why software systems are understood through virtual models and why analogies used to build those models need careful limits.

Key terms: virtual constructs, observable behavior, equivalent models, analogies, mental models, limitations

1.3 Different types of models

This section explains why distributed systems can be described through many models and why comparing those models improves understanding.

Key terms: mental model, informally, formally, action machines, state machines, state-action machines, unique perspective, holistic understanding, omissions, inconsistencies

1.3.1 Different models describing the same aspects

The section shows that two models can describe the same distributed-system behavior even when they place in-flight messages in different parts of the model.

Key terms: equivalent, communication bus, buffer, in-flight messages

1.3.2 Different models describing different aspects of a system

This section shows that different models of a distributed system may focus on different aspects, and that comparing their purposes gives a fuller understanding.

Key terms: Transaction Commit protocol, Two-Phase Commit protocol, message exchange, mental models, multiple perspectives, holistic understanding

1.4 Thinking about distributed systems

Introduces a mental model of a distributed system as message-communicating components whose behavior can be described as a sequence of state-changing steps.

Key terms: component, local state, network, messages in flight, state machine, state action machine, state, step, external steps, internal steps

1.4.1 Correctness

The section defines correctness through safety and liveness, then uses a two-participant distributed transaction to show how those guarantees constrain possible behavior.

Key terms: correctness, safety, liveness, possible behavior, distributed transaction, participants, P1, P2, committed, aborted

1.4.2 Scalability and reliability

The section defines scalability and reliability through responsiveness and explains why this framing is useful alongside safety and liveness.

Key terms: scalability, reliability, load, failure, responsiveness, service-level objectives, safety, liveness, mental models

1.4.3 Responsiveness

The section defines responsiveness through service-level measurements and explains why acceptable guarantees depend on the application and emerge from component interactions.

Key terms: service-level indicator, service-level objective, error rate, error budget, responsiveness, application-specific, correctness guarantees, scalability, reliability, emergent properties

1.5 Two big ideas

Introduces two ideas for thinking about distributed systems that will later ground definitions of services and microservices.

Key terms: systems of systems, global versus local viewpoints, services, microservices

1.5.1 Systems of systems

This section uses holons and holarchies to show how the same distributed system can be understood at different levels of abstraction.

Key terms: component, subsystem, holon, holarchy, higher-order entity, atomic entity, level of observation, database cluster, database nodes, tenant

1.5.2 Global view vs. local view

The section contrasts an observer’s global view with a component’s limited local view and explains why component-to-component communication depends on the network.

Key terms: global view, local view, system state, local state, component, network, message

1.6 Distributed Systems Incorporated

The section uses an office-building analogy to make distributed-system components, communication failures, and uncertain request outcomes easier to reason about.

Key terms: Distributed Systems Incorporated, concurrent component, local state, network, external interface, crash semantics, transient failure, intermittent failure, permanent failure, message-delivery semantics

1.7 Navigating complexity

This section introduces informal insights about distributed-system complexity that later chapters will explore in more depth.

Key terms: aha! moments, complexities of distributed systems

1.7.1 Simple yet complex

Simple rules for individual members of Distributed Systems Incorporated can combine to produce complex behavior across the organization.

Key terms: simple components, complex systems, Distributed Systems Incorporated

1.7.2 Emergent behavior

The section explains how a company’s scalability and reliability emerge from employees working together rather than from any one employee.

Key terms: emergent, scalability, reliability, unreliable components

1.7.3 Changing perspective

Distinguishes changes in model detail from changes in observer perspective, then uses a component’s limited view to state a core challenge of distributed systems.

Key terms: black-box, white-box, resolution, perspective, global view, local view, thinking globally while acting locally

1.7.4 Think globally; act locally

This section frames distributed-system design as the challenge of achieving a global guarantee through components that can act only on local information.

Key terms: global algorithm, local algorithm, global correctness, local knowledge, splitbrain

1.8 Thinking above the code

This section uses a code-free model of concurrent processes to explain race conditions and introduce reasoning about serializability.

Key terms: thinking above the code, tailored mental models, race conditions, process, atomic actions, concurrent composition, interleavings, race condition, correctness, sequential composition

1.9 Summary

The chapter summary connects mental models, the local-view challenge of distributed systems, and the guarantees used to reason about them.

Where this is used later

Concepts explained in this chapter

Chapter 2: System models, order, and time →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.