Skip to content
StackDecode
System Design
6. Distributed Systems FundamentalsAnimated

Distributed Communication

How nodes exchange information.

The idea

Nodes use RPC, messaging or streams. Each has different guarantees on delivery and ordering.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Client stubgRPC serverHTTP/2 + protobuf: GetUser(id=7)
  • current message
  • earlier
  • failure or attack

A generated stub serialises the call to compact binary.

step:
1/4
from:
Client stub
to:
gRPC server
1/4

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Pick a protocol
  2. 2Serialise the message
  3. 3Send it
  4. 4Handle timeouts and retries

Where it is used

Everything in a distributed system.

Watch out for

A timeout does not tell you whether the request ran.

Related