Linux VPS

Server high availability basics: redundancy, failover and clustering

What high availability means for servers, single points of failure, active-passive vs active-active, floating IPs with keepalived, database replication and when HA is worth the cost.

IntermediateVPS and dedicated servers3 min read

High availability (HA) means designing a system so it keeps working when a part fails. A single server, however good, is a single point of failure. This guide covers server high availability basics: where failures happen, the main HA patterns, and when the extra cost and complexity are worth it.

Before you start

Decide how much downtime is acceptable and how much data you could lose. These two targets – RTO (recovery time objective) and RPO (recovery point objective) – decide which design you need.

Find the single points of failure

LayerFailureCommon protection
DiskDrive diesRAID 1/10
PowerPSU or feed failsRedundant PSUs, A+B feeds, UPS
ServerMotherboard, kernel panicSecond server with failover
NetworkSwitch or uplink failureBonded NICs, multiple carriers
Data centreSite-wide outageSecond location, DNS failover
ApplicationBad deploy, bugRollbacks, staging, health checks
DataDeletion, corruption, ransomwareVersioned off-site backups

Active-passive vs active-active

  • Active-passive – one server handles traffic; a standby takes over if it fails. Simpler, and the standby can be smaller, but failover takes seconds to minutes.
  • Active-active – several servers handle traffic at once behind a load balancer. Better use of resources and seamless failure handling, but the app must work on several nodes (shared sessions, shared files).

Floating IPs with keepalived

Two servers share a virtual IP using VRRP. The primary holds it; if it stops sending heartbeats, the backup claims the IP within seconds. A minimal /etc/keepalived/keepalived.conf on the primary:

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 150
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass s3cr3t12
    }
    virtual_ipaddress {
        203.0.113.100/24
    }
}

The backup uses state BACKUP and a lower priority. Your provider must allow the extra IP to move between servers (often called a failover or floating IP).

Databases are the hard part

  • Primary-replica replication (MySQL/MariaDB, PostgreSQL) copies changes to a replica you can promote if the primary fails.
  • Multi-primary clusters such as MariaDB Galera allow writes on several nodes but need at least three nodes and low-latency links.
  • Replication is not a backup: a dropped table is replicated instantly.

DNS-level failover

Monitoring services and some DNS providers can switch a record to a standby IP when health checks fail. Keep TTLs low (for example 60–300 seconds), and remember some resolvers cache longer.

Is high availability worth it?

  1. Calculate what an hour of downtime costs you.
  2. Compare it with the cost of extra servers, licences and engineering time.
  3. For many sites, a well-run single server or managed hosting plus good backups, monitoring and a tested restore plan is the best value.

On shared and reseller hosting, the provider handles server-level redundancy such as RAID and power; MdmHost includes daily JetBackup backups.

FAQ: server high availability

Does RAID give me high availability?

Only against disk failure. Any other component failure still takes the server down.

What uptime can HA achieve?

Well-designed multi-server, multi-site setups can reach very high availability, but each extra "nine" costs significantly more.

Do I need a load balancer for HA?

For active-active, yes. Active-passive can use a floating IP or DNS failover instead.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.