Distributed Systems — Replication

Let's talk about real-time sync and issues related to it . Consider 1 master and 2 replicas. As soon as u write to master you can say the write has finished and then in the backened copy the data to replicas , also known as Asynchronous writes.
This has the disadvantage of replicas not being real time sync and any failure can cause loss of data if primary node crashes.
Whats the solution to above problem, We can wait for the replicas to finish(Synchronous Writes) writing making the write call blocking. But this poses another problem , the writes become too slow(could also cause indefinite blocking if no response is there from follower replicas) and it causes very bad client experience and not all business use cases can afford this.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store