ڈیٹابیسز اکثر ایک bottleneck بن جاتے ہیں جیسے جیسے سسٹمز بڑھتے ہیں۔ انہیں scale کرنے میں تکنیکیں شامل ہیں جیسے replication (read scaling اور availability کے لیے copies)، sharding (سرورز میں ڈیٹا تقسیم کرنا)، caching، اور موزوں ڈیٹابیس کی اقسام کا انتخاب۔
Replication — ڈیٹا کی copies
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)
