Distributed Application Architecture Patterns

8 Performance and Latency Patterns

This chapter presents patterns that do not necessarily facilitate scalability but solve some specific performance or latency issues introduced by the distribution.

  1. The Circuit Breaker pattern in § 8.1 improves latency in the event of a failing service so that a service can respond appropriately without having to wait for timeouts

  2. The Colocate pattern in § 8.2 names a simple fact: the closer two services are, the faster and more reliably they can communicate, and this needs to be considered when designing a distributed system

  3. The Aggregating Gateway pattern in § 8.3 improves the performance of clients on unreliable or slow networks by doing the heavy lifting for them

  4. The Claim Check pattern in § 8.4 offloads communication by storing large payloads in a shared location so that they do not need to be handled by message brokers or services that do not need them

  5. Under specific circumstances, the Command and Query Responsibility Segregation (CQRS) pattern in § 8.5 can improve performance by separating the read and write sides of a service

Other patterns that could be considered part of this category include [124]:

Notable omissions in this category due to the methodology described in § 1 include: