Skip to main content

Asynchronous vs Synchronous Replications

Asynchronous Replications

Streaming replication ae by default Asynchronous hoi 6e. jethi primary server, replication server na confirmation mate wait nathi kartu k changes apply thai gaya 6e k nahi. Primary server, directly client ne response aapi de 6e jyare ae potana (primary) server ma changes apply thai jata hoi 6e.

Jethi overall response time ma koi fark padto nathi k aapde streaming replication use karie pan 6ie k nahi.

Jyare standby replica servers ma WAL files ship thati hoi 6e and changes/updates asynchronously apply thata hoi 6e tyare primary server ma rahel update directly replica server ma available hota nathi. jethi kari ne failover na timing pramane, data lost thai sake 6e. te karno sar, aa prakar ni replication, remote areas ma disaster recovery mate use thai sake 6e. Aa reporting system ma, data migration and data loading jeva operations ma bhi use thai sake 6e.

Pros:

  • Fast response time

Cons:

  • data read on replica may not be fresh/latest.
  • data maybe lost in case of failover.

Synchronous Replications

Critical systems mate, aapde synchronous replication set kari sakie 6ie. Aa case ma primary server, process complete karta pehla, standby replica server na response no wait karse. Aa karno sar, overall response time ma log shipping no time pan include hoi 6e.

Pros:

  • Suitable for failover.
  • data read on replica will be fresh/latest.

Cons:

  • longer response time.

aathi ante apdne failover proof and read only load balancing distributed system male 6e.

aapde sync mode ne set karva time careful rehvu joie kem k ae response time and high availability ne affect kare 6e.

aa karno thi, bank transaction jevi critical scenario na case ma pan, matra thodo portion j critical hoi 6e. aa case ma synchronous replications pan asynchronous transactions support kare 6e. jethi badha changes ne replica server mathi confirmation nu wait karvu padtu nathi. Aano atlab aem 6e k table ma ketlo important data 6e ae mujab, synchronous and asynchronous banne ek j system ma set thai sake 6e.