Automate it, test it regularly, avoid split-brain, and have a failback plan.
Failover that does not turn into an incident
Automate detection and switch
Manual failover is minutes to hours; automated is seconds. Health checks must be smarter than "ping responded".
Prevent split-brain
Use quorum or a leader election (Raft, etcd, Consul). Two primaries with stale data is worse than one primary down.
Failback is a separate operation
Failback after failover is a planned maintenance, not an automatic reversal. Plan it, test it, schedule it.
DNS TTL matters
A failover that shifts DNS is limited by TTL. Keep critical records short (60-300s) or use anycast.
Test the failover path
A failover never exercised in production is a failover that will fail on the day it is needed.