Every distributed system strives for reliability, performance, and quality, but building such a system is hard. Establishing a set of design patterns enables software developers and system architects to use a common language to describe their systems and learn from the patterns and practices developed by others. The popularity of containers and Kubernetes paves the way for core distributed system patterns and reusable containerized components. This practical guide presents a collection of repeatable, generic patterns to help guide the systems you build using common patterns and practices drawn from some of the highest performing distributed systems in use today. These common patterns make the systems you build far more approachable and efficient, even if you've never built a distributed system before. Author Brendan Burns demonstrates how you can adapt existing software design patterns for designing and building reliable distributed applications. Systems engineers and application developers will learn how these long-established patterns provide a common language and framework for dramatically increasing the quality of your system. This fully updated second edition includes new chapters on AI inference, AI training, and building robust systems for the real world. Understand how patterns and reusable components enable the rapid development of reliable distributed systems Use the sidecar, adapter, and ambassador patterns to split your application into a group of containers on a single machine Explore loosely coupled multinode distributed patterns for replication, scaling, and communication between components Learn distributed system patterns for large-scale batch data processing covering work queues, event-based processing, and coordinated workflows

Browse the chapters to quickly get to know the structure and content of the book.
By browsing the chapters of this book you can quickly see what each part teaches, how the whole is structured and where to start. Each chapter focuses on one concept or skill, and you see its main topics so your choice is more informed. Whether you follow the whole book or just one part, this view helps you find your way.
Before we get started describing distributed systems, there are motivations and concepts that form the foundation of both why and how we build distributed systems. This section covers these foundational concepts to provide a basis for the rest of the book.
Distributed systems don’t exist in a vacuum. The development of such systems is based on the evolving role of both computing and online systems in business and entertainment. In particular, in the development of always-on, mission-critical systems that we rely on every day. Additionally, the development of modern distributed systems is based on the history of how such systems have been designed and built in the past. This history of both how the systems are built, and often more importantly how they have failed, has led us to the current containerized and microservice architectures that you find in this book.
Before the design of distributed systems can be described, it is necessary to have a grounding in core concepts for how server systems operate, as well as fundamental computer science concepts like locking and APIs. It is also necessary to have a grounding in basic operations for distributed systems, such as monitoring and logging. Finally, because distributed systems involve numerous interactions across many different systems and many different requests, it is necessary to have a basic understanding of statistics and how we can measure the common behavior across the system through observing ...

1. Introduction

2. Important Distributed System Concepts
This book concerns itself with distributed systems, which are applications made up of many different components running on many different machines. However, the first section of this book is devoted to patterns that exist on a single node. The motivation for this is straightforward. Containers are the foundational building block for the patterns in this book, but in the end, groups of containers colocated on a single machine make up the atomic elements of distributed system patterns.
Though it is clear as to why you might want to break your distributed application into a collection of different containers running on different machines, it is perhaps somewhat less clear as to why you might also want to break up the components running on a single machine into different containers. To understand the motivation for these groups of containers, it is worth considering the goals behind containerization. In general, the goal of a container is to establish boundaries around specific resources (e.g., this application needs two cores and 8 GB of memory). Likewise, the boundary delineates team ownership (e.g., this team owns this image). Finally, the boundary is intended to provide separation of concerns (e.g., this image does this one thing).
All of these reasons provide motivation for splitting up an application on a single machine into a group of containers. Consider resource isolation first. Your application may be made up of two components: one is a user-facing ...

3. The Sidecar Pattern

4. Ambassadors

5. Adapters
Chapter 5 described patterns for grouping collections of containers that are scheduled on the same machine. These groups are tightly coupled, symbiotic systems. They depend on local, shared resources like disk, network interface, or inter-process communications. Such collections of containers are important patterns, but they are also building blocks for larger systems. Reliability, scalability, and separation of concerns dictate that real-world systems are built out of many different components, spread across multiple machines. In contrast to single-node patterns, the multinode distributed patterns are more loosely coupled. While the patterns dictate patterns of communication between the components, this communication is based on network calls. Furthermore, many calls are issued in parallel, and systems coordinate via loose synchronization rather than tight constraints.
Recently, the term microservices has become a common term for describing multinode distributed software architectures. Microservices describe a system built out of many different components running in different processes and communicating over defined APIs. Microservices stand in contrast to monolithic systems, which tend to place all of the functionality for a service within a single, tightly coordinated application. These two different architectural approaches are shown in Figures III-1 and III-2.

6. Replicated Load-Balanced Services

7. Sharded Services

8. Scatter/Gather

9. Functions and Event-Driven Processing

10. Ownership Election
The preceding chapters described patterns for reliable, long-running server applications. This section describes patterns for batch processing. In contrast to long-running applications, batch processes are expected to only run for a short period of time. Examples of a batch process include generating aggregation of user telemetry data, analyzing sales data for daily or weekly reporting, or transcoding video files. Batch processes are generally characterized by the need to process large amounts of data quickly using parallelism to speed up the processing. The most famous pattern for distributed batch processing is the MapReduce pattern, which has become an entire industry in itself. However, there are several other patterns that are useful for batch processing, which are described in the following chapters.

11. Work Queue Systems

12. Event-Driven Batch Processing

13. Coordinated Batch Processing
So far we have focused on patterns for building your applications, all the way from single nodes to complex distributed systems. In addition to these patterns, there are parts of our systems that are universal to all applications that you build. The following chapters in this section cover some of these universal concepts. Chapter 14 discusses observability for your application via logging, monitoring and alerting. Observability is critical for you to understand if your application is operating correctly. Chapter 15 covers AI, which is revolutionizing the way that we think of applications and user interfaces. Finally, Chapter 16 ends this section by including common mistakes and errors that occur with unfortunate regularity in distributed systems that people build. No matter your application, all of these chapters will enable you to make it more intelligent and more reliable.

14. Monitoring and Observability Patterns

15. AI Inference and Serving

16. Common Failure Patterns
16 chapters in production
Reading time
05:59
Book type
Subscription
Participants
Be the first
Last updated
Sep 30, 2026