Wait for the server vs optimistic update

Waiting shows a like only after the server answers. An optimistic update shows it at once and keeps it in an outbox until the server accepts it. When the API is down for 15 s at 120 likes/s, waiting fails 17 percent of taps and p99 is 202 ms. The outbox gives p99 2.2 ms and loses no like.

Play the level

Read and write quorumsLeft and right arrows change R. Tap to change W.

W 3 + R 3 of 5 · every read sees the last write

Delivered twice, charged onceTap to turn the ID check on or off

13 deliveries · 10 payments applied · 0 charged twice

Case 1

A like must feel instant: p99 under 100 ms on 4G with a 65 ms round trip. The API is down for 15 s at 0:20 while 120 likes/s arrive. No like may be lost and no tap may fail.

Case 1
Measure Goal Wait for the server Show at once, retry from an outbox
p99 latency under 100 ms 202 ms Fail 2.2 ms Pass
Lost writes none 0 Pass 0 Pass
Error rate under 0.1% 16.7% Fail 0% Pass
Monthly cost 8 USD/mo 12 USD/mo
HTTP/2TCPMobile usersNode API1 vCPU · 1 GBKey-value s…1 vCPU · 1 GB
HTTP/2TCPMobile use…Node API1 vCPU · 1 GBKey-value…1 vCPU · 1 GB
Wait for the server: misses a goal
AMQPHTTP/2TCPMobile usersMessage bro…1 vCPU · 1 GBNode API1 vCPU · 1 GBKey-value s…1 vCPU · 1 GB
AMQPHTTP/2TCPMobile use…Message br…1 vCPU · 1 GBNode API1 vCPU · 1 GBKey-value…1 vCPU · 1 GB
Show at once, retry from an outbox: meets the goals