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
4
votes
2 answers

Restarting HAProxy without losing counters

I'm trying to found a way to restart HAProxy without clearing all my counters. I've tried the hot reconfiguration, but neither of the following commands seems to work: haproxy -f /path/to/haproxy.cfg -p /path/to/haproxy.pid -sf $(cat…
Leandro López
  • 216
  • 1
  • 7
4
votes
1 answer

HAproxy + failover on same nodes as apache?

We're currently using HAproxy to load balance our image and application servers, but we haven't setup failover. We currently just have haproxy on one of the image boxes which then routes the requests where they need to go. Now, next week we are…
user60903
4
votes
1 answer

Can a server run both haproxy and nginx? How would they both work?

Can a single server run both haproxy and nginx at the same time? I guess I would have to run nginx on a different port, and then route specific traffic to nginx? Say I have 2 domains, 1 requires nginx and the other requires another service. Can…
Blankman
  • 2,891
  • 10
  • 39
  • 68
4
votes
1 answer

Multi-threaded alternative to tinyproxy?

Are there any free, light-weight, single-process (e.g. multi-threaded, asyncore) HTTP forward proxy software? Tinyproxy works great, but it uses multiple processes like (Apache's) prefork. HAProxy and nginx are reverse proxies don't seem to have…
netvope
  • 2,123
  • 5
  • 25
  • 35
4
votes
2 answers

HAProxy Stats authentication: Does the username and password have to be cleartext?

I'm in the process of replacing my old nginx load balancer with HAProxy and I really like the stats dashboard because of the GUI that I can use to put servers into drain or maintenance. My concern, however is that the username and password for this…
Brad R
  • 45
  • 6
4
votes
1 answer

Provide multiple cfg files for haproxy loadbalancer

My haproxy loadbalancer currently runs using a single config file, /etc/haproxy/haproxy.cfg: ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS I want to split the haproxy.cfg to several files with…
TomTom
  • 141
  • 1
  • 4
4
votes
3 answers

haproxy tls1.0 to tls1.3 proxy

I have a very old application on prem that can only talk tls1.0 and I need to talk to a internet site on tls1.3. Can I use HAProxy to configure my local listener to listen on https tls 1.0 and forward these GET and POST requests to and internet…
Tag
  • 43
  • 1
  • 1
  • 3
3
votes
2 answers

SSL passthrough vs SSL termination + HTTPS

I understand that when configuring an HTTPS load balancer, SSL termination is generally more favored for speed and the ability to inspect the data and perform actions such as add headers, whereas SSL passthrough favors security but uses more…
Chase
  • 33
  • 1
  • 4
3
votes
1 answer

How to escape only quotes in haproxy log format

I am capturing the user-agent using: http-request capture req.hdr(User-Agent) len 192 And then trying to create a custom JSON log format like this: log-format '{"User-Agent":%{+Q,+E}[capture.req.hdr(0)]}' It works but when a User Agent includes…
nbari
  • 558
  • 1
  • 9
  • 28
3
votes
1 answer

Weighted routing across multiple HAProxy backends

I have two independent applications A and B. Each application uses blue/green deployments via blue/green AWS load balancers registered in a HAProxy backend using weighted routing. I have the requirement to route traffic across both applications…
Ben
  • 243
  • 3
  • 10
3
votes
0 answers

howto purge and view haproxy cache

I have a haproxy 1.9.4 running on CentOS 7 machine with the following configuration backend test acl is_cached path_end .js .css http-request cache-use static if is_cached http-response cache-store static if is_cached server my_webserver…
azatuni
  • 93
  • 1
  • 2
  • 9
3
votes
2 answers

wp-admin redirect loop when behind apache reverse proxy

Its my first post in Server Fault, so I'm sorry for any faux pas :) Problem: When I try to access "http://dummy_server/wp-admin" that is behind an apache acting as a WAF, it gets stuck in an infinite redirect loop. The full configuration of the…
Fran Gimenez
  • 343
  • 2
  • 8
3
votes
1 answer

Load Balancing And Sticky Sessions

According to what I understand , the use of sticky-sessions is to route user to the same backend so they won't have to for example login again each time they are re-routed or if they have a shopping cart , they won't lose their items etc. But I also…
John Doe
  • 495
  • 1
  • 6
  • 12
3
votes
2 answers

HAProxy prevent automatic failback on active/passive backend not working

I am attempting to do an haproxy setup with one frontend VIP and two backend web servers. I want the backend to be active/passive so that all requests go to server #1 unless server #1 is down, then send to server #2. When server #1 comes alive, stay…
Netman
  • 31
  • 1
  • 3
3
votes
2 answers

Using multiple conditionals in haproxy use_backend

Without brackets, seems it is not possible to have haproxy select use_backend based on true and (a or b) For example, I want to use_backend ClusterA if allowed_src and (method_a or path_b). Regardless if I invert the conditions before/after and, I…
haproxy-user1997
  • 33
  • 1
  • 1
  • 4