You probably need something like Fabio or Nginx to serve as a load balancer in front of the two instances you want to proxy.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
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!
Haproxy +keepalived can do it well, but you need a floating ip
Hi, could you explain more about why I'll need a VIP? I don't ever access an IP whilst using the reverse-proxy, what IPs would keepalived
need to create a VIP (I can certainly allocate an IP, I just need to know how keepalived
will work with it).
Thanks! In theory, this should work with other reverse-proxies like Traefik too, yes? Although I like the look of HAProxy haha
My current setup is a nginx instance to load balance to 3 nginx proxy manager instances
Can find plenty of guides on how to use a basic nginx config to load balance, and then nginx proxy manager can use a database and shared certificates.