Consistency models इस बारे में गारंटी परिभाषित करते हैं कि एक distributed system में data updates कब और कैसे दृश्यमान होते हैं — strong consistency (सभी नवीनतम data तुरंत देखते हैं) से लेकर eventual consistency (updates समय के साथ propagate होते हैं) तक। इस विकल्प में availability और performance के साथ trade-offs शामिल हैं।
Strong बनाम 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)
