What is the main purpose of running several copies (replicas) of a service or database?
Options
- To save money on the cost of infrastructure
- High availability: if one copy fails, others serve (Correct option)
- To make the code of the service much shorter
- To avoid the need to make any backups at all
Answer
High availability: if one copy fails, others keep serving; reads can also be spread across copies
Why
Machines and networks fail. With only one copy, any failure means downtime.
Replicas keep the system running when one dies (failover), and they can share read traffic.
Replicas are not backups: if someone deletes data by mistake, the deletion is copied to every replica too. You still need backups.
Remember
Replicas = availability. Backups = recovery from mistakes.