liveBook · Manning

Chapter 3: Failure tolerance

What you will learn in chapter 3 of Think Distributed Systems

The chapter introduction defines the purpose of failure tolerance and frames the chapter as a theoretical and practical exploration of failure.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduction defines the purpose of failure tolerance and frames the chapter as a theoretical and practical exploration of failure.

Key terms: failure tolerance, well-defined manner, theoretical, practical, failure detection, failure mitigation

3.1 In theory

This section defines failure tolerance through system states and transitions, introduces failure recovery, and sets a boundary around failures a system cannot tolerate.

Key terms: legal state, illegal state, intolerable state, normal transition, failure transition, failure tolerance, failure recovery, fault, error, failure

3.2 Types of failure tolerance

This section introduces safety and liveness as the properties used to describe failure tolerance, noting that failures may force a compromise between them.

Key terms: safety, liveness, failure tolerance

3.2.1 Masking failure tolerance

This section defines masking failure tolerance as preserving both safety and liveness despite failures, while noting that it may be too costly or impossible to guarantee.

Key terms: masking failure tolerance, safety, liveness, failure transparency, CAP conjecture

3.2.2 Nonmasking failure tolerance

Defines nonmasking failure tolerance as continued progress during failure without a guarantee that the system will avoid mistakes.

Key terms: nonmasking failure tolerance, liveness, safety, first in, first out

3.2.3 Fail-safe failure tolerance

Defines fail-safe failure tolerance as preserving safety during failures even when progress stops, using a message queue as an example.

Key terms: fail-safe failure tolerance, safety, liveness, queue

3.2.4 None of the above

The section uses a four-state process to distinguish a recoverable safety violation from a failure state that offers no guarantee of safety or liveness.

Key terms: safety, liveness, failure-tolerant, process P, x, nonmasking failure-tolerant, intolerable

3.3 In practice

This introduction shifts from theoretical failure tolerance to a practical failure-handling strategy for service-oriented distributed systems and sets aside detailed discussion of retries for chapter 4.

Key terms: failure-handling strategy, service-oriented distributed system, retry mechanisms, mitigation, message delivery and processing semantics

3.3.1 System model

This section models service orchestration as a sequence of requests and explains why failures must not leave a process partially applied.

Key terms: service orchestration, service consumer, service provider, process, request–response, total application, partial application, completeness, forward recovery, backward recovery

3.3.2 Failure handling

Failure handling detects unwanted events and mitigates them, using detection to protect safety and mitigation to restore liveness.

Key terms: failure handling, failure detection, safety, failure mitigation, liveness, quorum

3.3.3 Failure classification

This section classifies failures by the layer that can handle them and by how likely they are to recur, to guide detection and mitigation.

Key terms: layered architecture, downcall, upcall, application layer, platform layer, infrastructure layer, spatial dimension, end-to-end argument, application-level failure, platform-level failure

3.3.4 Failure detection

The section broadens failure detection beyond component crashes, then explains how message-based monitoring works and why its conclusions can be uncertain.

Key terms: failure detector, witness, predicate, application-level failure, platform-level failure, observer, observed component, pull, push, heartbeats

3.3.5 Failure mitigation

This section explains failure mitigation by contrasting backward recovery with forward recovery.

Key terms: failure mitigation, backward recovery, forward recovery, intermediary, illegal state, initial, legal state, final, legal state

3.3.6 Putting everything together

The section combines failure classification and mitigation into an escalating strategy for completing an orchestrated process despite failures.

Key terms: application-level failure, platform-level failure, backward recovery, compensating, transient, intermittent, autorepair, manual-repair, immediate retry, backoff strategy

3.4 Summary

The section summarizes how failure handling aims for failure tolerance by detecting and mitigating failures according to their classification and the desired tolerance strategy.

Where this is used later

Concepts explained in this chapter

← Chapter 2: System models, order, and time Chapter 4: Message delivery and processing →

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.