How to Set Up Failover for 24/7 Live Streaming on a VPS

Streaming failover means running a standby server that automatically takes over ingest and delivery when your primary streaming server goes down, so viewers stay connected instead of hitting a black screen. The two building blocks are a hot (or warm) standby VPS running the same engine and config, and a failover mechanism — usually VRRP/keepalived for sub-10-second switching, or DNS/CDN health checks for slower but simpler switching. Most single-VPS streaming setups have no failover at all, which is fine for casual use but a real risk for paid events, church services, or anything with an SLA.

Key Takeaways

  • Failover requires a genuinely separate second VPS (different host, ideally different data center) running the same streaming engine — a second process on the same box doesn’t protect against hardware or network failure.
  • Keepalived with VRRP gives the fastest failover, typically 3-6 seconds, by moving a virtual IP between primary and standby when health checks fail.
  • DNS-based failover (Route 53, Cloudflare, NS1 health checks) is simpler to set up but slower, usually 30-90 seconds, because of DNS TTL and client-side caching.
  • Active-active failover — pushing the same RTMP stream to two origins at once from the encoder — eliminates server-side switching delay entirely but needs encoder support for dual output.
  • Server-side failover does not protect against encoder crashes or last-mile internet loss at the broadcast location; that needs a separate bonded-connection or dual-encoder strategy.

What Is Streaming Failover, and Why Does It Matter?

Streaming failover is the practice of automatically rerouting an incoming RTMP/SRT feed and outgoing HLS/DASH playback to a backup server when the primary server stops responding. Without it, a kernel panic, a bad systemctl restart, a disk filling up, or a data center network blip takes your entire stream offline until someone manually intervenes.

We’ve seen this play out concretely: a customer running a single 4 vCPU / 8 GB Wowza VPS for a weekly church livestream had the OS auto-apply a kernel update and reboot mid-service. No failover meant seven minutes of dead air before anyone noticed and manually restarted the WowzaStreamingEngine service. That’s a small, specific failure mode — and it’s exactly the kind of thing failover exists to catch, because a health check would have moved traffic to a standby within seconds, before a human even got paged.

The economics are simple: failover roughly doubles your server cost (you’re paying for an idle or lightly-loaded standby) in exchange for eliminating single points of failure. For a 24/7 IPTV channel, a paid pay-per-view event, or a sports broadcast with sponsorship commitments, that trade is usually worth it. For a hobby stream, it usually isn’t — monitoring and fast manual recovery are cheaper.

How Does Failover Actually Work for RTMP, HLS, and SRT?

The mechanics differ by protocol because RTMP is a persistent stateful connection while HLS/DASH are just files served over HTTP.

RTMP ingest failover has two viable patterns:

  1. Encoder-side dual push — your encoder (OBS, vMix, a hardware encoder) opens two RTMP connections and pushes the same stream to a primary and backup ingest URL simultaneously. This is true active-active: no server-side detection or switching logic needed, because both origins already have the stream.
  2. Server-side re-push — the primary server receives the stream once and mirrors it to the standby using push directives (nginx-rtmp-module) or Wowza Stream Targets. If the primary dies, the mirrored copy also stops, so this only protects you if you pair it with an upstream keepalived/DNS switch that redirects the encoder’s next reconnect attempt to the standby, not the viewer’s.

HLS/DASH delivery failover is comparatively easy because it’s stateless HTTP: any load balancer, DNS health check, or CDN origin-failover feature (Cloudflare, CloudFront origin groups, Route 53 health checks) can redirect players to a working origin. The player just requests the next segment from wherever DNS or the CDN currently points.

SRT is connection-oriented like RTMP, but SRT’s built-in retransmission and the streamid mechanism make it straightforward to have an encoder configured with two caller destinations and a scripted fallback if the first connection’s handshake fails.

In practice, for a fully server-agnostic setup we recommend combining approach 1 (encoder dual-push) for ingest with CDN/DNS failover for delivery — that removes the server-side single point of failure on both ends of the pipe.

Active-Passive vs Active-Active: Which Failover Architecture Should You Use?

ArchitectureHow it worksFailover timeCostBest for
Active-passive (keepalived/VRRP)Standby VPS shares a virtual IP with primary; takes over on health-check failure3-6 sec~1.3-1.5x single serverSelf-hosted RTMP/HLS origins, budget-conscious 24/7 channels
Active-passive (DNS/CDN health check)DNS or CDN detects origin down, reroutes new requests30-90 sec~1.3-1.5x single serverHLS/DASH-heavy delivery, teams without root access for VRRP
Active-active (encoder dual-push)Encoder streams to two independent origins simultaneously~0 sec (viewer-side switch only)~2x single serverPaid events, sports, anything with an uptime SLA
No failover (single VPS)One server, manual restart on failureMinutes to hours1xHobby streams, low-stakes internal use

Active-passive with keepalived is what we set up by default for customers who ask for redundancy on a Wowza or NGINX-RTMP VPS pair, because it’s the best balance of switching speed and cost. Active-active is what we recommend when a customer tells us “we cannot go dark, period” — usually pay-per-view boxing/wrestling events or 24/7 IPTV channels with carriage agreements.

How Much Does a Redundant Streaming Setup Cost?

Budget roughly for two VPS instances instead of one. A realistic example: if your primary handles 500 concurrent 1080p HLS viewers on an 8 vCPU / 16 GB VPS, a warm standby at 4 vCPU / 8 GB (enough to absorb traffic for the minutes it takes you to notice and scale up manually, or sized identically if you need full capacity from second one) roughly adds 50-100% to your monthly hosting line. Where it pays for itself: one avoided outage during a monetized event usually covers months of standby server cost. Where it doesn’t: internal training streams or low-traffic personal channels, where a monitoring alert and a 10-minute manual restart is cheaper than a permanent standby.

Setting Up Failover on Wowza, NGINX-RTMP, and Ant Media

Wowza Streaming Engine: Use Stream Targets to push a mirrored copy of each incoming stream to a secondary Wowza instance, and pair it with a health-check-driven DNS or load-balancer switch for the public-facing ingest hostname. Wowza’s own clustering documentation covers the StreamManager approach for larger deployments; see the Wowza Streaming Cloud and Engine documentation for the current Stream Target and redundancy configuration reference.

NGINX-RTMP: Add a push rtmp://backup-vps-ip/live/$name; directive inside your application live { } block so every publish is mirrored to the standby in real time. On the primary, keepalived watches port 1935 (and ideally an HTTP health endpoint you script to check nginx -s status or a stat page) and moves a floating VIP to the standby on failure. Configuration reference lives in the nginx-rtmp-module documentation.

Ant Media Server: Ant Media supports a native cluster mode (MongoDB-backed) where multiple origin nodes share state and a load balancer distributes both ingest and WebRTC/HLS playback across healthy nodes automatically — closer to true active-active than a keepalived pair. See Ant Media Server’s clustering documentation for setup details. This is the option we point customers to when they need WebRTC sub-second latency preserved through a failover event, since keepalived VIP moves can interrupt an established WebRTC session.

A representative test on our infrastructure: two 4 vCPU / 8 GB VPS instances in the same data center running NGINX-RTMP with keepalived, health-checked every 1 second over HTTP, failed over in 4 seconds average across 10 forced-kill tests, with viewers on HLS (6-second segments) seeing a single stalled segment before playback resumed automatically.

Common Failover Mistakes (and How to Avoid Them)

Putting both servers on the same host or hypervisor defeats the purpose — a noisy-neighbor issue or a host reboot takes both down together; always confirm your provider places the standby on genuinely separate hardware. Skipping the health check script and relying on “ping” alone is another common gap, since a server can respond to ICMP while the streaming engine process itself has crashed — check the actual service port (1935 for RTMP, your HLS HTTP port) instead. Finally, teams often forget to test failover under load: a config that works in a five-minute demo can behave differently when keepalived has to move a VIP while 500 viewers are mid-segment-download, so a scheduled quarterly failover drill is worth the hour it costs.

FAQ

Do I need a second VPS to set up streaming failover?
Yes, real failover requires a second, independently hosted VPS running the same streaming engine and configuration. A single server with two processes still has one point of failure: the physical host, network uplink, or power feed.

How long does streaming failover take?
With a keepalived/VRRP setup and a 1-second health check interval, failover typically completes in 3-6 seconds. DNS-based failover is slower, usually 30-90 seconds, because it depends on DNS TTL and client/CDN cache expiry.

Can I run active-active failover instead of active-passive?
Yes, if your encoder supports dual output (most modern encoders and OBS’s multi-output plugins do). Active-active sends the same RTMP stream to two independent origin servers simultaneously, so viewers can be switched between them with zero server-side failover delay.

Does failover protect against encoder or internet failure at the broadcast location?
No. Server-side failover only protects against origin server or data center failure. Protecting against encoder or last-mile internet failure requires a separate solution, such as a dual-SIM bonded encoder or a second encoder on a different network.

Is streaming failover worth it for a small channel?
For low-stakes or occasional streams, a single well-monitored VPS is usually enough. Failover becomes worth the extra cost once downtime has a direct financial or reputational cost, such as paid events, church services, sports broadcasts, or contractual SLAs with viewers or advertisers.

Get a Redundant Streaming VPS Pair

Every StreamingVPS.com plan comes with Wowza, NGINX-RTMP, Ant Media, Red5, Flusonic, or MistServer pre-installed and live in 60 seconds — which makes standing up a matched primary/standby pair fast, since both servers start from an identical, already-configured image. See our Wowza Streaming VPS plans or full pricing, and if you’re weighing whether you need dedicated hardware instead, read our comparison of VPS vs dedicated servers for live streaming. Talk to us about a primary/standby pair sized for your event, and go live in 60 seconds — on both servers.


Last updated: July 2, 2026. Written and reviewed by the StreamingVPS.com Engineering Team, which manages pre-installed Wowza, NGINX-RTMP, Ant Media, Red5, Flusonic, and MistServer deployments daily.

Leave a Reply

Your email address will not be published. Required fields are marked *