Replication is the copying of information to multiple computer systems or databases in a way that ensures consistency of the information across systems.
Synchronous Replication is a data replication technique between databases and file systems which delivers fastest recovery of data without any significant data loss, while providing protection against problems related to database integrity. This ensures that data is replicated between systems efficiently without any losses.
Synchronous replication creates a remote copy of the data, which is an exact mirror image of the primary copy, when the primary copy is updated. The system with the primary copy proceeds after waiting for the data recording to have completed on the duplicate system.
In synchronous replication, only after completion of an input/output operation is confirmed at both the primary and mirrored sites, is the update operation considered complete. A rollback takes place at both the locations when incomplete operation takes place which ensures that the remote copy is an exact copy of the primary.
The advantages and disadvantages of synchronous replication
There are some advantages for synchronously replicating data, while quick data recovery is one of the major of them. If there is a disruption of the operation at the primary site, the operations at the remote site can begin at that very instant, at the point where the primary site stopped. The operations which are being processed at that instant are the only ones which are at a risk of being lost.
However, there are some disadvantages as well for synchronous replication when the main one is the large response time, which arises because the primary system has to wait for the secondary system before it can proceed.
Thus, because of the increased response time and communication delays, synchronous replication is often impractical unless the secondary system is physically located close to the primary system. The primary enterprise storage transport protocol is Fibre channel.
Theoretically this fibre channel can extend up to a maximum of 200 kilometers. However, the time lags become a problem as the propagation delays increases with the increasing distance. Propagation delays force the system to pause and wait for confirmation of every storage operation at the primary and the remote sites.
These delays cause significant system slow down. Considering the response time and other factors, the practical distance for synchronous replication is marked at 35 kilometers to 50 kilometers for a busy system.
The application of synchronous replication
The most commonly found example of the use of synchronous replication is in Google Apps. Google Apps store customer information in two data centers at the same time, so that if by chance one of these centers fails, Google can instantly transfer data over to the other center since this has also been reflecting the actions taken by the customer all along.
This concept is applied to the entire Apps suite as well as Gmail including Google Calendar, Google Docs and Google Sites!