సిస్టమ్లు వృద్ధి చెందుతున్నప్పుడు డేటాబేసులు తరచుగా బాటిల్నెక్ అవుతాయి. వాటిని స్కేల్ చేయడం రెప్లికేషన్ (రీడ్ స్కేలింగ్ మరియు లభ్యతకు కాపీలు), షార్డింగ్ (సర్వర్ల మధ్య డేటాను విభజించడం), క్యాచింగ్, మరియు తగిన డేటాబేస్ రకాలను ఎంచుకోవడం వంటి పద్ధతులను కలిగి ఉంటుంది.
Replication — డేటా యొక్క కాపీలు
REPLICATION → maintain COPIES of the database across servers:
→ PRIMARY (writes) + REPLICAS (copies):
- READ SCALING → direct reads to replicas (offload the primary) → handle more reads
- AVAILABILITY → a replica can take over if the primary fails (failover)
⚠️ replication lag → replicas may be slightly behind (eventual consistency for reads)
→ great for READ-heavy workloads and availability (most apps are read-heavy)
