Skip to content
- Discussed the key concepts of consistency—eventual consistency and strong consistency—as important topics in microservices, especially with asynchronous communication.
- Provided a real-world analogy with a shop transaction: paying with cash (strong consistency) guarantees immediate completion, while paying with card (eventual consistency) might see a delay before the transaction reflects.
- Highlighted that synchronous communication in microservices typically leads to strong consistency, where success or failure is immediately known and can be handled instantly.
- Asynchronous communication is associated with eventual consistency, making it harder to guarantee when or if another service’s state has changed or actions have completed.
- Mentioned the benefit of asynchronous communication in reducing tight, real-time coupling between services, though this comes with trade-offs in how consistency is achieved and perceived.
- Stressed that with asynchronous patterns, handling failures is more complex as there’s no immediate guarantee an operation has taken place.
- Used Amazon as an example: after placing an order, the site may show confirmation instantly, but payment failures can be detected and communicated later via email, illustrating an eventual consistency scenario.
- Emphasized that while asynchronous approaches increase flexibility, they require thought into how errors and delays are handled from both technical and user perspectives.
- Noted that most large microservices systems end up with a mix of synchronous and asynchronous communication.
- Suggested starting with asynchronous communication as a general heuristic, only opting for synchronous or bespoke approaches when specifically required.