Hi, I was looking at different reverse proxies (Traefik, Caddy, NGINX, Apache (mod_proxy
), HAProxy) - I wanted to run two instances of a reverse proxy on different devices for failover. I do not find much about running reverse-proxies in a failover configuration, could someone point me at a resource related to these proxies so I can figure out how to run reverse-proxies in an HA configuration?
Thanks
Edit: The answer seems to be using keepalived
, because I will be using this only in my homelab and not exposing it to the internet.
Related links if someone is interested:
You probably need something like Fabio or Nginx to serve as a load balancer in front of the two instances you want to proxy.
Just to be clear, I want an HA setup for my reverse proxies. How will running another reverse-proxy (NGINX) in front of my existing reverse-proxies help me here? This will again become a single point of failure which I’m looking to avoid.
Thanks!
One of the easier options would be something like a DNS-based load balancer with an extremely short TTL (<60 seconds). Cloudflare offers an option that is $5/mo to use.
You would need 2 haproxies to do this.
Otherwise, you’re likely looking into something like keepalived with an elastic/additional/failover IP that can swap between instances if a failover situation is detected
edit: something like this would be what I’m talking about for hetzner: https://vitobotta.com/2020/03/20/haproxy-kubernetes-hetzner-cloud/
Essentially you’ll need some sort of API access to be able to swap the floating IP between the ha proxy instances on demand if keepalived detects a fault and needs to swap the floater to another machine.
Thank you. Since this will only be for my LAN, I’ll start reading up on
keepalived
. Thanks for mentioning it.Related links if someone is interested:
Thanks!