Enable and start:
This article dissects every component of the Realm Host V2 HA Tunnel. You will learn what it is, how the architecture works, step-by-step configuration for active-passive and active-active clusters, and advanced troubleshooting. Before diving into HA tunnels, we must understand the core tool. realm host v2 ha tunnel
vrrp_script chk_realm script "/usr/local/bin/realm health check --port 8443" interval 2 fall 2 rise 2 Enable and start: This article dissects every component
Note: In a true HA setup, 0.0.0.0:8443 is bound on all nodes, but only the VIP owner routes traffic. Install Keepalived on both nodes: 0.0.0.0:8443 is bound on all nodes
[log] level = "info" output = "/var/log/realm/realm.log" [ha] enabled = true mode = "active-passive" peer_discovery = "etcd" # or "static" for small clusters etcd_endpoints = ["http://192.168.1.20:2379", "http://192.168.1.21:2379"] session_ttl = 10 Shared tunnel definition (this is the HA tunnel) [[tunnels]] name = "ha-tunnel-01" listen = "0.0.0.0:8443" # The VIP address will be set by external LB listen_type = "tcp" remote = "127.0.0.1:8080" # Backend service remote_type = "tcp" TLS for the tunnel [tunnels.tls] cert = "/etc/realm/tls/fullchain.pem" key = "/etc/realm/tls/privkey.pem" Health check (critical for HA decision) [tunnels.health_check] enabled = true interval = "2s" timeout = "1s" healthy_threshold = 2 unhealthy_threshold = 3 http_path = "/health/alive" expect_status = 200 Failover behavior [tunnels.failover] max_retries = 3 retry_interval = "5s" backup_remote = "127.0.0.1:8081" # secondary backend
Introduction: The Need for Uninterrupted Connectivity In the modern era of edge computing, microservices, and remote work, a single point of failure in your network gateway is no longer acceptable. Whether you are running a home lab, a corporate VPN, or a geo-distributed proxy mesh, downtime translates directly to lost productivity or revenue.