Scaling for Reads
Jyare aapde statistics ne dhyaan ma rakhi ne better read performance achieve karva mate read bound scaling karvu pade tyare, vadhare ne vadhare servers set karva ae bau vadhare common 6e.
Aa case ma badho data master server mathi slave server ma replicate thato hoi 6e. Aa case ma high availability pan male 6e, kem k jo ek server down thai to taratj diju server aene replace kari de 6e.
Data nu replication aapde PostgreSQL ni built in capability (Streaming Replication, Logical Replication) thi thai sake 6e ane aapde middleware (PgPool II) solutions bhi use kari sakie 6ie.
Replication Use Cases:
- handle extra read load
- provide high availability
WAL files (Write-Ahead Logging)​
PostgreSQL na badha Replication solutions na case ma WAL Files no use thai 6e.
Aa log file ma database ma thayel badha changes na log hoy 6e.
Jyare ek WAL file full thai jay tyare server ek new WAL file banava nu start kari de 6e.
Jyare WAL file ma rahel changes apply thai jay 6e tyare aa files ma rahelo data useful nathi rehto and aene overwrite kari sakie 6ie.