The Synchrony Budget: Minimizing Synchronous Calls in Distributed Systems
This article explores the importance of managing synchronous calls when building distributed service systems. The author introduces the concept of a "synchrony budget," advocating for minimizing synchronous requests between services to improve performance and availability. Synchronous calls are costly, impacting response times and system stability. Using an e-commerce order processing example, the article demonstrates how to handle interactions with inventory and shipping services asynchronously (e.g., using Kafka), reserving synchronous calls for situations where they're essential (like payment services). The author also covers the Outbox pattern and CDC technology for handling message buffering and data synchronization in asynchronous communication, ultimately achieving a high-performance and highly available distributed system.