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
| Layer | Failure | Common protection |
|---|---|---|
| Disk | Drive dies | RAID 1/10 |
| Power | PSU or feed fails | Redundant PSUs, A+B feeds, UPS |
| Server | Motherboard, kernel panic | Second server with failover |
| Network | Switch or uplink failure | Bonded NICs, multiple carriers |
| Data centre | Site-wide outage | Second location, DNS failover |
| Application | Bad deploy, bug | Rollbacks, staging, health checks |
| Data | Deletion, corruption, ransomware | Versioned 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?
- Calculate what an hour of downtime costs you.
- Compare it with the cost of extra servers, licences and engineering time.
- 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.
