Databases ħafna drabi isiru bottleneck meta l-sistemi jikbru. Tiskalizza tagħhom tinvolvi tekniki bħall-replication (kopji għal read scaling u availability), sharding (qsim tal-data fuq servers), caching, u għażla ta' tipi ta' databases xierqa.
Replication — kopji tal-data
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)
