Realm Host V2 Ha Tunnel

To truly know your HA tunnel is working, you need metrics.

                    Internet
                        │
                 ┌─────▼─────┐
                 │  Keepalived│
                 │  (VRRP VIP: 203.0.113.10)
                 └─────┬─────┘
                       │
         ┌─────────────┼─────────────┐
         │             │             │
    ┌────▼────┐    ┌────▼────┐   ┌─────▼─────┐
    │ Realm-1 │    │ Realm-2 │   │  etcd /   │
    │ (Active)│◄──►│(Standby)│   │ Consul    │
    └────┬────┘    └────┬────┘   └───────────┘
         │              │
    ┌────▼────┐    ┌────▼────┐
    │Backend 1│    │Backend 2│ (Your actual services)
    └─────────┘    └─────────┘

How it works:

Realm V2 exposes a Prometheus endpoint on http://localhost:9090/metrics when [metrics] is enabled: realm host v2 ha tunnel

[metrics]
enabled = true
listen = "127.0.0.1:9090"
path = "/metrics"

Key metrics for HA:

realm host v2 route add 172.16.0.0/16 via ha-tunnel-1 priority=100 To truly know your HA tunnel is working, you need metrics


[tunnels.health_check] enabled = true interval = "2s" timeout = "1s" healthy_threshold = 2 unhealthy_threshold = 3 http_path = "/health/alive" expect_status = 200

  • Gateway config:
  • The client’s configuration is where the "HA Tunnel" magic happens. Realm Host V2 does not natively have a "HA" keyword, but you can achieve this using multiple remote entries and a companion script. How it works: Realm V2 exposes a Prometheus

    Client config (/etc/realm/config.toml):

    [log]
    level = "info"
    

    [network] no_delay = true

    [[endpoints]] listen = "0.0.0.0:25565"