Once upon a time, people wrote programs that ran on one machine andwere also accessed from that machine. The world has changed. Now, nearlyevery application is a distributed system running onmultiple machines and accessed by multiple users from all over theworld. Despite their prevalence, the design anddevelopment of these systems is often a black art practiced by aselect group of wizards. But as with everything in technology, theworld of distributed systems is advancing, regularizing, and abstracting.In this book I capture a collection of repeatable, generic patternsthat can make the development of reliable distributed systems moreapproachable and efficient. The adoption of patternsand reusable components frees developers from reimplementing the samesystems over and over again. This time is then freed to focus onbuilding the core application itself.
Navigating This Book
This book is organized into a 4 parts as follows:
Introduces distributed systems and explains why patterns andreusable components can make such a difference in the rapid developmentof reliable distributed systems.
Chapters discuss reusable patterns and components thatoccur on individual nodes within a distributed system. It covers theside-car, adapter, and ambassador single-node patterns.
Chapters cover multi-node distributed patterns for long-running serving systems like web applications. Patterns for replicating, scaling, and master election are discussed.
Chapters cover distributed system patterns forlarge-scale batch data processing covering work queues, event-basedprocessing, and coordinated workflows.
If you are an experienced distributed systems engineer, you can likelyskip the first couple of chapters, though you may want to skim themto understand how we expect these patterns to be applied and why wethink the general notion of distributed system patterns is so important.
Everyone will likely find utility in the single-node patterns as theyare the most generic and most reusable patterns in the book.
Depending on your goals and the systems you are interested in developing,you can choose to focus on either large-scale big data patterns, orpatterns for long-running servers (or both). The two partsare largely independent from each other and can be read in any order.
Likewise, if you have extensive distributed system experience, you mayfind that some of the early patterns chapters (e.g., onnaming, discovery, and load balancing) are redundant with what youalready know, so feel free to skim through to gain the high-level insightsbut dont forget to look at all of the pretty pictures!
Conventions Used in This Book
The following typographical conventions are used in this book:
ItalicIndicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Warning
This icon indicates a warning or caution.
Online Resources
Though this book describes generally applicable distributed systempatterns, it expects that readers are familiar with containers andcontainer orchestration systems. If you dont have a lot of pre-existingknowledge about these things, we recommend the following resources:
https://docker.io
https://kubernetes.io