Failover

Failover is a high availability (HA) mechanism that monitors servers for failures and reroutes traffic or operations to a redundant server when the primary server fails.

Failover is automatic and operates without warning to reduce downtime.

Failover is usually associated with a health check system where the redundant or standby server listens for irregular health checks between itself and the main server. If there are irregular health checks or a health check is not returned, then the redundant or standby server takes the place of the main server.

App Platform

High availability (HA) is only supported for Professional apps when running two or more containers so that there is a failover for App Platform’s load balancer to use. If you require HA when using Starter or Basic apps, you must upgrade your app to the Professional tier.

MongoDB

MongoDB offers automatic failover. When the primary server becomes unresponsive passed a specified threshold of time (10 seconds by default), your database nominates a new primary through secondary calls. The secondary calls that replace the primary are held in a replica set which in MongoDB is a group of processes with the same data set.

For more information on how to set up failover, see How to Configure a MongoDB Replica Set on Ubuntu 20.04.

MySQL

MySQL utilizes replication in order to ensure failover. Replication synchronizes data across multiple databases in ensure that there are multiple copies of your data that can replace any failed database servers. This ensures that the database is highly available.

For more information on how to set up failover, see How To Set Up Replication in MySQL.

PostgreSQL

PostgreSQL uses replication which enables failover. Replication is the process of copying data from one PostgreSQL server to another. The primary server is the main server while the replicas are replica servers. Automatic failover is in place such that the primary server is automatically replaced by a replica server if the primary server fails or becomes unavailable.

Redis

Redis has commands for failover to create failover between the main node and the replicas used to replace the main node. If the main node of the cluster becomes unavailable, then one of the replicas takes the place of the main making Caching clusters highly available.

There is the cluster failover command:

CLUSTER FAILOVER [FORCE | TAKEOVER]

There is a failover command:

FAILOVER [TO host port [FORCE]] [ABORT] [TIMEOUT milliseconds]

Reserved IP

Reserved IPs allow you to reassign an IP address from a failed Droplet to an active Droplet, making them a highly-available component of your infrastructure. This can ensure that your application’s traffic remains flowing through the same public IP address without disruption.

You can learn how to design a high availability system through our community tutorial.

Failover Articles

Create a MongoDB database cluster from the DigitalOcean Control Panel.
Create a PostgreSQL database cluster from the DigitalOcean Control Panel.
Create a Caching database cluster from the DigitalOcean Control Panel.