Try
↑ ↓ move↵ openesc close

Chat delivery lab

Send messages to 30 users through four gateways with packet loss, gateway crashes and users who go offline. Compare showing messages on arrival with holding them for order, and duplicate checks on and off.

tick 60gateways up 3 of 4users online 15 of 30shown on arrival

What the screens show

sent
600
shown
565
out of order
3.9%
duplicates shown
0

Messages carry a sequence number per recipient. Out of order means a message appeared after one that was sent later.

Delivery work

waiting for first delivery
35
resends
127
gateway crashes
1
median / 99th percentile delay
0 / 18 ticks

A message that gets no acknowledgement is sent again. Messages for offline users wait in their inbox.

Messages not yet delivered, last 150 ticks
Messages not yet delivered, last 150 ticks. Text version available below the chart.01325385013160recent ticksmessages

What to try

Each one sets up a starting point. Then make the change it describes.

  1. A calm network

    Set loss, crashes and offline users to 0.

    Look for. Every message arrives at once, in order, once. Nothing needs resending.

  2. Loss reorders messages

    Keep 10 percent loss and show messages on arrival.

    Look for. A lost message is resent a few ticks later, after a newer one has landed. Some messages appear out of order.

  3. Hold for sequence

    Switch client ordering to hold for sequence.

    Look for. Nothing appears out of order. A message waits for its predecessors, so the slowest deliveries get slower.

  4. Lost acknowledgements duplicate

    Turn the duplicate check off.

    Look for. A message that arrived but whose acknowledgement was lost is sent again, and now it shows twice.

  5. Offline users catch up

    Raise users going offline to 5 percent a tick.

    Look for. Messages wait in the inbox until the user returns, so the tail of the delay grows. The median stays small.

  6. Gateway crashes

    Set gateway crashes to 2 percent a tick and loss to 0.

    Look for. Users on a dead gateway reconnect to another one and catch up from their inbox. Delivery is late but nothing is lost.

New to the idea? Read the lesson first. Every number here comes from a seeded simulator, so the same seed gives the same run.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms