Patterns of Distributed Systems

Book description

A Patterns Approach to Designing Distributed Systems and Solving Common Implementation Problems

More and more enterprises today are dependent on cloud services from providers like AWS, Microsoft Azure, and GCP. They also use products, such as Kafka and Kubernetes, or databases, such as YugabyteDB, Cassandra, MongoDB, and Neo4j, that are distributed by nature. Because these distributed systems are inherently stateful systems, enterprise architects and developers need to be prepared for all the things that can and will go wrong when data is stored on multiple servers--from process crashes to network delays and unsynchronized clocks.

Patterns of Distributed Systems describes a set of patterns that have been observed in mainstream open-source distributed systems. Studying the common problems and the solutions that are embodied by the patterns in this guide will give you a better understanding of how these systems work, as well as a solid foundation in distributed system design principles.

Featuring real-world code examples from systems like Kafka and Kubernetes, these patterns and solutions will prepare you to confidently traverse open-source codebases and understand implementations you encounter "in the wild."

  • Review the building blocks of consensus algorithms, like Paxos and Raft, for ensuring replica consistency in distributed systems

  • Understand the use of logical timestamps in databases, a fundamental concept for data versioning

  • Explore commonly used partitioning schemes, with an in-depth look at intricacies of two-phase-commit protocol

  • Analyze mechanisms used in implementing cluster coordination tasks, such as group membership, failure detection, and enabling robust cluster coordination

  • Learn techniques for establishing effective network communication between cluster nodes.

Along with enterprise architects and data architects, software developers working with cloud services such as Amazon S3, Amazon EKS, and Azure CosmosDB or GCP Cloud Spanner will find this set of patterns to be indispensable.

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

..

Table of contents

  1. Cover Page
  2. About This eBook
  3. Halftitle Page
  4. Title Page
  5. Copyright Page
  6. Pearson’s Commitment to Diversity, Equity, and Inclusion
  7. Dedication Page
  8. Contents
  9. Foreword
  10. Preface
    1. Why This Book
    2. Who This Book Is For
    3. A Note on Examples
    4. How to Read This Book
  11. Acknowledgments
  12. About the Author
  13. Part I: Narratives
    1. Chapter 1. The Promise and Perils of Distributed Systems
      1. The Limits of a Single Server
      2. Separate Business Logic and Data Layer
      3. Partitioning Data
      4. A Look at Failures
      5. Replication: Masking Failures
      6. Defining the Term “Distributed Systems”
      7. The Patterns Approach
    2. Chapter 2. Overview of the Patterns
      1. Keeping Data Resilient on a Single Server
      2. Competing Updates
      3. Dealing with the Leader Failing
      4. Multiple Failures Need a Generation Clock
      5. Log Entries Cannot Be Committed until They Are Accepted by a Majority Quorum
      6. Followers Commit Based on a High-Water Mark
      7. Leaders Use a Series of Queues to Remain Responsive to Many Clients
      8. Followers Can Handle Read Requests to Reduce Load on the Leader
      9. A Large Amount of Data Can Be Partitioned over Multiple Nodes
      10. Partitions Can Be Replicated for Resilience
      11. A Minimum of Two Phases Are Needed to Maintain Consistency across Partitions
      12. In Distributed Systems, Ordering Cannot Depend on System Timestamps
      13. A Consistent Core Can Manage the Membership of a Data Cluster
      14. Gossip Dissemination for Decentralized Cluster Management
  14. Part II: Patterns of Data Replication
    1. Chapter 3. Write-Ahead Log
      1. Problem
      2. Solution
      3. Examples
    2. Chapter 4. Segmented Log
      1. Problem
      2. Solution
      3. Examples
    3. Chapter 5. Low-Water Mark
      1. Problem
      2. Solution
      3. Examples
    4. Chapter 6. Leader and Followers
      1. Problem
      2. Solution
      3. Examples
    5. Chapter 7. HeartBeat
      1. Problem
      2. Solution
      3. Examples
    6. Chapter 8. Majority Quorum
      1. Problem
      2. Solution
      3. Examples
    7. Chapter 9. Generation Clock
      1. Problem
      2. Solution
      3. Examples
    8. Chapter 10. High-Water Mark
      1. Problem
      2. Solution
      3. Examples
    9. Chapter 11. Paxos
      1. Problem
      2. Solution
      3. Examples
    10. Chapter 12. Replicated Log
      1. Problem
      2. Solution
      3. Examples
    11. Chapter 13. Singular Update Queue
      1. Problem
      2. Solution
      3. Examples
    12. Chapter 14. Request Waiting List
      1. Problem
      2. Solution
      3. Examples
    13. Chapter 15. Idempotent Receiver
      1. Problem
      2. Solution
      3. Examples
    14. Chapter 16. Follower Reads
      1. Problem
      2. Solution
      3. Examples
    15. Chapter 17. Versioned Value
      1. Problem
      2. Solution
      3. Examples
    16. Chapter 18. Version Vector
      1. Problem
      2. Solution
      3. Examples
  15. Part III: Patterns of Data Partitioning
    1. Chapter 19. Fixed Partitions
      1. Problem
      2. Solution
      3. Examples
    2. Chapter 20. Key-Range Partitions
      1. Problem
      2. Solution
      3. Examples
    3. Chapter 21. Two-Phase Commit
      1. Problem
      2. Solution
      3. Examples
  16. Part IV: Patterns of Distributed Time
    1. Chapter 22. Lamport Clock
      1. Problem
      2. Solution
      3. Examples
    2. Chapter 23. Hybrid Clock
      1. Problem
      2. Solution
      3. Examples
    3. Chapter 24. Clock-Bound Wait
      1. Problem
      2. Solution
      3. Examples
  17. Part V: Patterns of Cluster Management
    1. Chapter 25. Consistent Core
      1. Problem
      2. Solution
      3. Examples
    2. Chapter 26. Lease
      1. Problem
      2. Solution
      3. Examples
    3. Chapter 27. State Watch
      1. Problem
      2. Solution
      3. Examples
    4. Chapter 28. Gossip Dissemination
      1. Problem
      2. Solution
      3. Examples
    5. Chapter 29. Emergent Leader
      1. Problem
      2. Solution
      3. Examples
  18. Part VI: Patterns of Communication between Nodes
    1. Chapter 30. Single-Socket Channel
      1. Problem
      2. Solution
      3. Examples
    2. Chapter 31. Request Batch
      1. Problem
      2. Solution
      3. Examples
    3. Chapter 32. Request Pipeline
      1. Problem
      2. Solution
      3. Examples
  19. References
  20. Index
  21. Code Snippets

Product information

  • Title: Patterns of Distributed Systems
  • Author(s): Unmesh Joshi
  • Release date: December 2023
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780138222246