Distributed Communication Patterns#

The moment your code makes a call that leaves the process, everything you knew about function calls stops being true. This page is the set of patterns that exist because of that one fact — the ones you will reach for every week. Mental model first, code second. Press Play on any animation to watch the idea move.

Every pattern on this page answers one question: how do you build something dependable out of components that can be slow, can be down, and can never tell you which? Timeouts, retries, idempotency keys, circuit breakers, queues, outboxes and sagas are not seven unrelated tools. They are seven answers to that single question, and each one buys reliability with a currency you must be willing to spend: latency, duplication, staleness, or complexity.

16 Topics • Mental Models, Interactive Animations & Worked Questions
Unit 1

Calling Another Service#

Choosing whether to wait for an answer, picking an API style, and finding a healthy instance to send the call to.

Unit 2

Surviving Failure#

Timeouts, retries, idempotency and circuit breakers — the tools that turn the third outcome from an outage into a blip.

Unit 3

Asynchronous Messaging#

Putting a broker between services: how queues and topics decouple them, what delivery guarantees really promise, and what to do when consumers fall behind.

Unit 4

Consistency Across Services#

Keeping data correct when one business action spans a database, a broker and several services that can each fail halfway through.

Unit 5

Reaching Clients & Long-Running Work#

Pushing updates to browsers and partners, handing back results that take minutes, and the whole course on one page.