Consistency models என்பது distributed system முழுதும் data updates எப்போது மற்றும் எப்படி visible ஆகும் என்ற guarantees-ஐ define செய்கிறது — strong consistency (அனைவரும் latest data-ஐ உடனே பார்ப்பார்கள்) முதல் eventual consistency (updates time-க்கு பிறகு propagate ஆகிறது) வரை. இந்த தேர்வு availability மற்றும் performance-க்கு எதிரான trade-offs-ஐ involve செய்கிறது.
Strong vs eventual consistency
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)
