Optimistic update or wait

  • Choose
  • Pixel 10

Difficulty 3 of 5

Liking a post must feel instant: p99 under 100 ms on 4G (65 ms round trip). At 0:20 the API is down for 15 s while 120 likes/s arrive. Pick how the app sends a like. No like may be lost and no tap may fail. Budget: 40 USD/month.

Play level

Options

  • Wait for the server, then show the like
  • Show the like at once and send it once in the background
  • Show the like at once, keep it in an outbox and retry until the server accepts it
Read and write quorumsLeft and right arrows change R. Tap to change W.

Goals and limits

p99 latency
under 100 ms
Lost writes
none
Error rate
under 0.1%
Monthly cost
under 40 USD/mo
Traffic
120 req/s

Concepts

How players did

Player results load from the server.