What is data replication, and why is it important?

Instruction: Define data replication and discuss its significance in database systems.

Context: This question tests the candidate's understanding of data replication techniques and their role in enhancing data availability, disaster recovery, and load balancing.

Updated

Official Answer

Replication maintains copies of data on other servers or systems. It can support failover, read scaling and geographically closer access, but the guarantees depend on the replication and failover design.

With asynchronous replication, a replica may lag. Reads can be stale, and promoting it after a primary failure can lose changes that had not arrived. Synchronous replication can strengthen durability guarantees for acknowledged writes, depending on the configured acknowledgement point, at a latency or availability cost.

A working failover also needs health detection, routing and protection against two writable primaries. Test recovery and measure replication lag, recovery time and potential data loss against the service requirements.

Replication is not a substitute for a recoverable backup: accidental deletion or corruption may be replicated too. Backups, retention and tested restoration address a different failure mode.

Source

PostgreSQL: standby replication and failover considerations.

Related Questions