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
5
votes
1 answer

Is there any default nameserver for HaProxy resolvers?

I use HaProxy to forward traffic to a backend server which has a dns name instead of network address: backend default-backend server external somedomain.com:80 The problem is that there is a situation when it can become not resolvable. In this…
Kirill
  • 245
  • 3
  • 7
5
votes
1 answer

haproxy redirect custom http traffic to a custom https port

I wish to redirect my custom http port traffic to custom https port based on the port I receive traffic on I have multiple bind statements : bind 1.2.3.4:7777 bind 1.2.3.4:8888 bind 1.2.3.4:9999 ssl crt /etc/haporxy/somecert.crt What I've tried…
UtkarshK
  • 63
  • 1
  • 5
5
votes
0 answers

HAProxy subdomains and path redirection

I'm new to StackExchange and am trying find some assistance with a configuration problem. I need to create a configuration for HAProxy that will allow me to dynamically proxy a Tomcat application context path to a subdomain. The subdomain/path can…
5
votes
2 answers

Return a specific/200 status code for a particular URL prefix in Haproxy

In Nginx we can return a specific status code to URL prefix like this. location /api { return 200; } How can we achieve the same in Haproxy?. Gone through Haproxy ACL but couldn't find any.
Augustin
  • 117
  • 2
  • 6
5
votes
1 answer

Can HAProxy retry a different server after backend sends a 500 error?

I have a corner case where some application servers behind HaProxy return 500 codes for some requests if they are running an old version of code. Generally this only happens when an upgrade is in progress across the cluster, but can happen if a…
jSp
  • 51
  • 1
  • 2
5
votes
1 answer

Why isn't HAProxy adding "X-Forwarded-For"?

I've followed numerous references online, which tell me I should just be able to set up a frontend like: frontend http_https bind 1.2.3.4:443 ssl crt /etc/haproxy/tls/mycert.pem bind 1.2.3.4:80 mode http option httplog option forwardfor …
pioto
  • 331
  • 1
  • 4
  • 13
5
votes
1 answer

SASL auth to LDAP behind HAPROXY with name mismatches

My kerberos domain in MYEXAMPLE.ORG, but servers are located in the dmz-int.example.org dns zone. LDAP server is b1.dmz-int.example.org; its keytab include: udo ktutil -k /etc/krb5.keytab list /etc/krb5.keytab: Vno Type …
473183469
  • 1,360
  • 1
  • 12
  • 23
5
votes
3 answers

Import configuration files in haproxy.cfg

I have almost 200 lines of ACL configurations in haprox.cfg and also contains 150 backends. To remove this configuration complexity, I want to bundle this configuration in separate files and will import those files in haprox.cfg. Is this possible…
user364875
  • 61
  • 1
  • 1
  • 3
5
votes
1 answer

HAProxy TCP Transparent Mode Remote Servers

Alright so I have a server box with HAProxy installed and I need it to forward traffic to two MySQL servers. They are both located in completely different datacenters. It works when I have this removed from the config: source 0.0.0.0 usesrc clientip…
Rhododendron
  • 83
  • 1
  • 1
  • 5
5
votes
1 answer

haproxy 1.5 specific source IP address show 503 SC in haproxy log

I have an unusual problem (as everyone does on this site). I have HAProxy listening on port 80 and 443. I am offloading SSL encryption to HAproxy and passing all traffic to my web servers on port 80. There is a firewall in front of my HAProxy server…
Brad
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

haproxy acl for url and url parameter

I want to create an ACL in haproxy 1.6 that allows a particular url and url parameter ONLY when they both appear at the same time. For example: example.com/url/of/page3?foo=bar I am doing this already in the frontend section of my haproxy…
simon
  • 714
  • 1
  • 7
  • 21
5
votes
1 answer

understanding HAProxy Frontend and Backend current session stats

I have configured HAProxy with a single Frontend and Backend, from the stats page I see the following stats: system limits: memmax = unlimited; ulimit-n = 20013 maxsocs = 20013; maxconn = 10000; maxpripes =0 current conns = 361; current pipes 0/0;…
nbari
  • 558
  • 1
  • 9
  • 28
5
votes
1 answer

Making HAProxy Pass a Host Name in HTTPCHECK

I am trying to perform HTTP Checks in HAProxy with a specific host name. Here is a snippet from my backend configuration: option httpchk HEAD / HTTP/1.1\r\nHost: example.com http-check expect rstatus (2)[0-9][0-9] When I view the IIS logs on the…
Fenton
  • 224
  • 2
  • 4
  • 15
5
votes
3 answers

Is HAProxy still necessary when Varnish can act as a load balancer?

I would like to load-balance my application servers, as well as cache the responses from them. I've read an article dating back to 2012 on HAProxy's website, that was supposed to clear the confusion between HAProxy and…
BenMorel
  • 4,507
  • 10
  • 57
  • 85
5
votes
2 answers

HAProxy rspadd or set-header

I am currently trying to improve my HAProxy HTTPS configuration. There seems to be two ways to set additional fields to response headers in HAProxy. I currently use http-response set-header, which should, if I understand it right: Check if the…
ITChap
  • 183
  • 1
  • 8