High availability and operations

Add replicas without creating a new route

Run multiple connectors for one tunnel and understand that replicas improve connector availability rather than duplicating DNS configuration.

One connector host is one point of failure. It reboots for patches, its disk fills up, someone trips over its power cable. The fix is not a second tunnel. It’s a second connector for the same tunnel.

A tunnel can have multiple cloudflared replicas. A replica is another cloudflared process running with the same tunnel credentials, usually on a different host:

# on the second host, with the same tunnel token
sudo cloudflared service install eyJhIjoiNmZmNDJhZTIt...

Cloudflare sends traffic through whichever connections are healthy. One host can go down without removing the hostname or the private route. Check that both replicas registered:

cloudflared tunnel info practice-app

The output lists each connector with its own ID, origin IP, and connections. Two connectors, each holding several edge connections, is the picture you want.

Why this beats a second tunnel

Hostnames and private routes belong to the tunnel, not to any connector. Replicas inherit all of it for free. If you created a second tunnel for redundancy instead, you’d duplicate every DNS record and route, and keep the copies in sync forever. Replicas improve connector availability without duplicating configuration. That is the entire design.

Place replicas deliberately

Two replicas on the same VM host, power feed, or uplink fail together. That buys you nothing. Put them where they fail independently.

Both replicas must also reach the origin service on their own. A replica that registers with Cloudflare but cannot reach the origin turns a clean failure into intermittent errors, because Cloudflare will happily send it traffic. Half your requests fail and the other half work, which is worse than a full outage to debug.

And notice where the single point of failure went. Two connectors pointing at one app process just moved it one hop inward. High availability also needs an origin that can survive or move beyond one host.

Run a second practice connector, stop the first, and watch what happens before you call the design redundant. Keep cloudflared tunnel info open while you stop it. Its connections drop out of the list, requests keep succeeding, and nothing needed your intervention. Redundancy you have not exercised is a hope, not a design.

Lesson completed