Modelos de consistência definem garantias sobre quando e como atualizações de dados se tornam visíveis em um sistema distribuído — variando de consistência forte (todos veem os dados mais recentes imediatamente) até consistência eventual (atualizações se propagam ao longo do tempo). A escolha envolve trade-offs com disponibilidade e desempenho.
Consistência forte vs eventual
STRONG CONSISTENCY → every read returns the MOST RECENT write (all nodes agree immediately):
✓ simple to reason about; always correct/current data
✗ requires coordination → higher latency, lower availability (especially during partitions)
→ for: data that must be correct/current (financial balances, inventory, bookings)
EVENTUAL CONSISTENCY → updates propagate over time; reads MAY return stale data briefly,
but all nodes CONVERGE eventually:
✓ high availability, low latency, scalable
✗ reads can be stale temporarily (must tolerate this)
→ for: data where brief staleness is OK (social feeds, likes, view counts, caches)
