Questions tagged [haproxy]

HAProxy is an open source, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing.

See also:

2099 questions
1
vote
0 answers

How to load balance Socket Connections?

We have a large pool of devices that establishes socket connections with a server. Connections are TCP socket connections hitting a server IP: port pair from a destination IP port pair. In stand alone mode there is no problem in responding back to…
ramdaz
  • 685
  • 1
  • 10
  • 26
1
vote
1 answer

HaProxy - Abillity to redirect subdomains and the base domain to the same backend

I need some help with the HaProxy setup. Currently, I have the following config: frontend fe_main_http bind :80 reqadd X-Forwarded-Proto:\ http use_backend %[req.hdr(Host),lower] frontend fe_main_https bind 0.0.0.0:443 ssl crt…
1
vote
0 answers

HAproxy DNS discovery's efficiency

We use haproxy for our lb platform, we have many frontends with very dynamic backend (servers will be added/removed 10000 > times per day). We now add a server to config file and reload the process with master-worker concept which works great but…
Vignesh SP
  • 129
  • 1
  • 10
1
vote
2 answers

Use HAProxy as a Forward Proxy for PowerMTA

Can PowerMTA use HAProxy as a forward proxy to deliver mail using the IP address HAProxy is serving on? This is not the typical use case of HAProxy because it's not load balancing, it is connecting THROUGH haproxy to use the IP address that HAProxy…
brizz
  • 11
  • 2
1
vote
1 answer

HAProxy 301 Re-Direct non www to www for root domain

I am trying to setup HAProxy in a way that when a user goes to example.com, they are 301'ed to www.example.com, while keeping intact the users ability to go to sub1.example.com, sub2.example.com, etc, the rule I have been trying to use on the front…
roomwillow
  • 13
  • 3
1
vote
1 answer

HAProxy stick table rate expiration

I am using HAProxy on Ubuntu to perform some rate limiting. Here are the most important fragments from my config: global stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners frontend http-listener bind *:80…
Benjamin
  • 111
  • 4
1
vote
1 answer

haproxy & complex redirects: am I missing anything?

I have a complex Apache config that mostly just does ProxyPassReverse, and that seems pretty silly so I've been converting it to haproxy. Mostly this has led to things being much, much simpler and clearer; yay. The exception is complex RewriteRule…
rlpowell
  • 203
  • 1
  • 7
1
vote
1 answer

Why browser is always showing certificate of only one server even if multiple certificates are configured in HAProxy?

I am a beginner in HAProxy. I have four VMs, with HAProxy in one and Apache httpd in other three. What I am trying to achieve is, when user connect to HAProxy IP using https, the connection should be redirected to any of the other three servers.…
Alfred
  • 111
  • 3
1
vote
0 answers

How can I get HAProxy to override / standardise the assignment of a cookie across multiple backends?

I am running HAProxy version 2.0.12 2019/12/21 - It hosts multiple backends. In the web layer, I have a persistent cookie which just contains a GUID and is meant to be super-long lived (50 years, but can be any large value). It needs to be set in a…
Jon Rea
  • 111
  • 4
1
vote
1 answer

Only require a minimum version of TLS (1.2) when a specific backend is used in HaProxy

I have a single frontend, but multiple backends. I'm upgrading security on some backends, and as a part of that, i want to only allow TLS1.2 or higher, when getting requests to those specific backends. There's still customers using the other…
Talkar
  • 21
  • 6
1
vote
1 answer

HAproxy with failover to a sorry page

My use case is as follows: In the config I have one frontend that listens on HTTPS and serves to a backend The backend has one or more servers. When all of the backend servers are down, I want to serve a sorry page, hosted in another place to give…
Johnathan
  • 111
  • 2
1
vote
1 answer

haproxy peers as swarm deployment

I am trying to set up an active-active cluster with swarm and haproxy. I am struggling with the peers definition as it takes hostname and IP address into account. With swarm this can be a bit tricky. I want to use mode host for the ports on the…
The Fool
  • 117
  • 1
  • 9
1
vote
0 answers

Can HAproxy dispatch tcp connections equaly on backend machines?

Rules: We have 4 backend machines behind a HAproxy server. One client opens 4 long-lived tcp connections. We have two clients. Each client should have 1 long-lived tcp connection per backend machine. No specific IP addresses of clients should be…
Ezwig
  • 111
  • 2
1
vote
1 answer

HAProxy: sending email-alert to multiple recipients

Please advise: I was asked to configure HAProxy on Ubuntu, with very little knowledge. The current configuration load-balances about 20 webservers and monitors them for heartbeat. whenever a site comes down, it generates an email alert. The thing is…
Yaniv
  • 11
  • 2
1
vote
1 answer

Haproxy: Log only faulty requests (http: 4xx, 5xx)

I am currently adding rate limiting to http and mqtt services in haproxy. These are working, but I also want to show the blocked requests in the logs. On the http frontend I return a 429 and on the mqtt I close the connection on blocked…
Frankie777
  • 11
  • 3