Go · 2026

distributed-broadcast

A gossip protocol that stays available and eventually consistent across a 25-node cluster under 100 ms latency.

availability
100%
nodes
25
p99 latency
530 ms
fewer RPCs
~90%

A broadcast node built to pass the broadcast workload of Maelstrom, Jepsen’s workbench for testing distributed systems against partitions and latency.

Design

  • Temporal batching. Messages are buffered and flushed on a 15 ms tick, the way Nagle’s algorithm does for TCP. That cut RPCs by roughly 90% compared with forwarding each message.
  • Pipelining. An incoming broadcast is committed to local state at once; forwarding happens on separate, non-blocking workers per neighbour.
  • Backpressure. Each neighbour gets a semaphore of ten in-flight RPCs, so a slow link cannot stall the rest during partition recovery.
  • At-least-once delivery. Every batch is acknowledged; anything that times out goes back in the queue.

Results

25 nodes in a four-ary tree, 100 ms simulated latency, 100 messages a second for 20 seconds:

Measure Result
Availability 100%
Consistency strong eventual
Latency, p50 385 ms
Latency, p99 530 ms
Messages per operation about 13.3