sync_alt

ConsistencyPlayground

Data Visualization

What is Eventual Consistency?

In distributed systems, data doesn't travel instantly. Eventual Consistency is the guarantee that if you stop updating data, all servers will eventually have the same value.

info For the customer, this creates the "Why am I seeing old data?" problem.
dns

How It Works

Imagine three servers in different parts of the world. When you write data to one (e.g., "New York"), it takes time to copy that data to "London" and "Tokyo".

During this delay (latency), the system is inconsistent. A user in Tokyo might see old data even after the New York user has updated it.

The "Inconsistency Window"

The time gap between the initial write and the final sync. Your goal as a developer is to hide this gap from the user.

Latency Simulation: 1500ms
database
New York (A)
v:0
dns
London (B)
v:0
dns
Tokyo (C)
v:0
System Consistent

Handling it for the Consumer

You can't fix the speed of light, but you can fix how the user feels about it. Choose the right pattern for the job.

bolt

Optimistic UI

Assume the request will succeed. Update the interface immediately. Sync in background.

Best For
  • check Like Buttons
  • check Commenting
  • check To-Do Lists
lock_clock

Pessimistic UI

Block interaction until the server confirms success. Shows loading states.

Best For
  • check Payments / Money
  • check Booking Tickets
  • check Critical Settings
autorenew

Background & Polling

Notify the user when data is ready or updated. Don't block flow.

Best For
  • check Collaborative Docs
  • check Email Inboxes
  • check File Uploads
Interactive Demo

Experience the Difference

Try adding items to this list with different Consistency Models turned on.

tune Configuration

Latency 1.5s
Server Console Log
> System ready.

My Tasks

cloud_done All synced
Review project proposal Synced