0

I have the following infra : 3 servers which handle micros services. In front, I have one single proxy server which exposes services or website following the domain name.

I would to improve this with loadbalancing on the proxy side. So my idea is basically adding a second proxy server with nginx too. But now if I want HA too, I need to upgrade nginx to nginx plus or add a HA solution like HAproxy, right ? With HAproxy is it possible to just apply a "TCP proxy pass config" and let's nginx handle the routing and HTTPS stuff ? So I could have a HAProxy which forwards to nginx which forwards to webservices or provides static files on both proxy servers. Each proxy server will be behind separated firewall and have a different public ip.

Thank's for your ideas/advices.

Fayçal

FLAA
  • 1

1 Answers1

0

You probably want an HA pair of HAProxy machines forwarding to your microservices hosts. HAProxy is built to do this TCP style load balancing:

http://cbonte.github.io/haproxy-dconv/2.4/intro.html#3.3.1

For failover, you'll need some additional software. See this guide using keepalived:

https://www.digitalocean.com/community/tutorials/how-to-set-up-highly-available-haproxy-servers-with-keepalived-and-floating-ips-on-ubuntu-14-04

dmourati
  • 25,540
  • 2
  • 42
  • 72
  • I thought the failover was handled by HAProxy natively. But it's keepalived that I need. I can have nginx on each server with keepalived for failover. HAproxy I will try it for improve the HA between nginx and microservices. So it's seems better to have : 2 servers with Nginx <--> HAproxy <--> microservices. And failover is managed with keepalived. Thank's for your help – FLAA Dec 09 '20 at 14:36