HAProxy is a 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.

learn more… | top users | synonyms

25
votes
3answers
16k views

How can I remove balanced node from haproxy via command line?

I have haproxy running as my load-balancer and from the stats web interface that comes with haproxy, I can put a web server into maintenance mode (and bring it back out again) - which is great! ...
19
votes
4answers
11k views

Ordering: 1. nginx 2. varnish 3. haproxy 4. webserver?

I've seen people recommend combining all of these in a flow, but they seem to have lots of overlapping features so I'd like to dig in to why you might want to pass through 3 different programs before ...
5
votes
2answers
10k views

How to setup HAProxy with failover?

I understand that, to get failover on an HAProxy load balancing setup, you need two machines running HAproxy (and route it to several webserver instances). But in this case, say abcd.com, how do we ...
3
votes
1answer
2k views

mod_evasive behind HAPROXY

I have a couple of Apache 2 machines behind an HAPROXY setup, I tried to setup mod_evasive on those Apache machine while also using mod_rpaf to get the real X-FORWARDED client ip. For some reason, ...
20
votes
3answers
8k views

How can I deploy a scalable, reliable haproxy cluster on Amazon EC2?

We need some more advanced functionality than ELB provides (mostly L7 inspection), but it's not obvious how to handle things like heartbeat and high availability with something like haproxy using EC2. ...
14
votes
7answers
20k views

Remote IP's with HAProxy

I'm testing a new web server setup which is having a couple of issues. Essentially, we have a web server, where the code uses the remote IP for some interesting things, and also some apache ...
7
votes
2answers
5k views

Is there a way to configure HAProxy to send traffic based on a cookie?

When configuring HAProxy, I would like to send traffic to certain servers based on the cookie. Example, there is the HAProxy server, and 2 web servers (serverA and serverB) When someone logs in, a ...
1
vote
2answers
2k views

Mysterious HAProxy request errors

I see tons of request errors on one of my frontend proxies (on the order of a few per second), but I can't figure out what's causing them. I've tried using the "show errors" command on the stats ...
3
votes
1answer
5k views

Can HAProxy be used to rewrite for pretty URLs?

Can HAProxy rewrite a URI from "domain.com/cool/url" to "domain.com/index.php/cool/url" as it passes a request to the Web server? Thanks.
1
vote
1answer
7k views

HAProxy not passing SSL traffic in TCP mode (unknown protocol)

I've got a HAProxy LB solution setup and working correctly. All HTTP traffic on port 80 is being passed through succesfully. I'm now trying to get SSL traffic to work (in TCP mode and on just one ...
2
votes
1answer
110 views

Exclude particular IP address from Postfix log

I have a postfix relay system that uses HAProxy to check to make sure Postfix is responding as it should. There is a front-end load balancer which connects using an internal IP to the backend servers. ...
1
vote
2answers
454 views

Change backend when reaching maxconn HAProxy

I have just started using HAProxy, and I am building a real-time chat application. I wonder if it is possible to send clients to another backend when the current backend reaches its maxconn (I am ...
1
vote
1answer
2k views

Why am I getting errors in my HAProxy content switching config?

I'm migrating some infrastructure from multiple servers hosting specific sites to a load-balancing architecture using HAProxy 1.3.15.7 on OpenBSD 4.6 macppc. Naturally, I'm starting with configuring ...
15
votes
7answers
27k views

How can I use HAproxy with SSL and get X-Forwarded-For headers AND tell PHP that SSL is in use?

I have the following setup: (internet) ---> [ pfSense Box ] /-> [ Apache / PHP server ] [running HAproxy] --+--> [ Apache / PHP server ] ...
8
votes
4answers
5k views

haproxy + stunnel + keep-alive?

I'd like to put stunnel in front of haproxy 1.4 to handle HTTPS traffic. I also need stunnel to add the X-Forwarded-For header. This can be achieved by the "stunnel-4.xx-xforwarded-for.diff" patches ...
6
votes
1answer
3k views

HAProxy graceful reload with zero packet loss

I'm running an HAProxy load balancing server to balance load to multiple Apache servers. I need to reload HAProxy at any given time in order to change the load balancing algorithm. This all works ...
7
votes
6answers
2k views

why no examples of horizontally scalable software load balancers balancing ssl?

I have a bunch of questions with respect to ssl, local sessions, and load balancing which seem to be interconnected, so I apologize in advance for the length of this question. I have a website which ...
8
votes
1answer
2k views

Poor load balancer performance on rackspace and centos

I am load testing different options for load balancing, and am getting poor results from Nginx, haproxy, and varnish. I have one 4GB load balancer at Rackspace, hitting 4x1GB app servers. I'm ...
1
vote
3answers
5k views

Is it possible to make redundancy on HAProxy server?

I am going to use HAProxy as a load balancer that will balance requests on 3 application servers. But what if balancer server (HAProxy) fails at some point? I was thinking of cloning the first ...
11
votes
5answers
11k views

Windows replacement for HAProxy

It does not appear that there is a similar question to this already posted, so I will go ahead and ask. I am working on a project that could benefit from having two - four servers handling incoming ...
5
votes
4answers
5k views

What are the Differences between HAProxy and Ngnix in reverse proxy mode?

What are the differences between HAProxy and Nginx when it comes to their abilities as a reverse proxy?
1
vote
2answers
2k views

Can haproxy load-balance by referrer URL? (filtering a Slashdot scenario)

I have a poorly performing web app that will be massively scaled out to cope teh internets. Haproxy will be used to farm out the stateless web requests to many servers. However, there's still a limit ...
12
votes
2answers
6k views

How to Read the haproxy Stats Page

For those of you using HAProxy along with the stats papge (haproxy?stats), how do I interpret this page? There is no decent explanation. For instance: Which Session column displays the number of ...
7
votes
2answers
3k views

HAProxy SSL Farm Options

I am trying to figure out how to set up an SSL farm with haproxy and SSL reverse proxies and I am looking for some general advice: Is it possible to meet all of the following: Load balance requests ...
2
votes
3answers
1k views

Use HAProxy or Nginx to Load Balance between VPS

I want to load balance + failover backup multiple vps webservers hosted on different providers. I heard that for HAProxy you need multiple server under the same subnet, plus a shared (virtual) ip ...
2
votes
1answer
1k views

Stunnel too many clients

I'm trying to hook up stunnel and haproxy to forward https connections through to some backend servers. I've got haproxy setup right, and I seem to have stunnel set up right. Trouble is that when I ...
6
votes
1answer
2k views

Load balancing MySQL using HAProxy: Got an error reading communication packets?

I've set up load balancing MySQL slaves using HAProxy via a xinetd. 2 load balancers shared a virtual IP that is managed by Pacemaker: crm configure show: node SVR120-27148.localdomain node ...
3
votes
2answers
3k views

Load Balancing long running TCP connections

I'm trying to research the best way to load balance long running TCP connections for the following scenario: We have multiple servers behind a redundant set of firewalls and clients establish long ...
3
votes
3answers
1k views

Rolling deploys with Tomcats behind an HAProxy instance

I have three Tomcat instances running behind an HAProxy. When I roll out changes to my web applications, I'd like to do a rolling deploy (i.e. bounce one Tomcat at a time) so users don't see any ...
2
votes
1answer
3k views

Is it possible to configure HAProxy to choose a backend server based on a request's source IP? If so, how?

The title pretty much says it all. Basically, I want to route a request to a specific backend server based on the request's source IP. i.e., HTTP Request from 192.168.100.1 -> HAProxy -> ...
1
vote
1answer
3k views

haproxy and persistant connections

I am using HAproxy to load balance between more web server. Those webservers are using PHP and sessions to keep one's session open. Now, I think that when a user refreshes the page, it is sent to one ...
1
vote
1answer
985 views

Using virtual IP with stunnel and haproxy

We have a load-balancer setup, in which an HTTPS Request flows through the following steps:- Client -> DNS -> stunnel on Load-Balancer -> HAProxy on LB -> Web-Server This setup works ...
0
votes
1answer
325 views

Will this HAProxy “restart script” work as gracefully I think it will?

I put this script together from various places. What I am hoping is that it will do the following once run: Pause all "NEW" http traffic for ports 80 and 443 - just "pause" them, don't give any ...
0
votes
1answer
670 views

haproxy transparent mode on 14.04

As per my previous question SSHD real-ip behind haproxy - I'm now attempting to setup HAProxy to transparently pass the IPs to the backend services. tproxy modules loaded / and supported in haproxy ...
0
votes
1answer
7k views

Haproxy ACL for balance on URL request

I'm usung Ubuntu with haproxy 1.4.13 version. Its load balancing two subdomains: app1.domain.com app2.domain.com now i want to be able to use ACL to send based on url request to the right ...
4
votes
2answers
12k views

haproxy and forwarding client IP address to servers

I have a problem with HAproxy. I use HAproxy as load balancer which distribute incoming http requests to 5 web servers. normally a client request's is forwarded to web servers with loadbalancer's IP. ...
2
votes
1answer
2k views

choose server backend to some URL with haproxy

To some URL I don't want use some server. So use other. Actually I have this haproxy configuration. global ...
2
votes
3answers
870 views

Route traffic to node with lowest latency in HAproxy

Is it possible to route requests via HAproxy to a server that has the lowest latency from the source IP? This seems like a much needed requirement but I can't seem to find anything. My problem is ...
1
vote
1answer
966 views

option http-server-close on HAProxy haproxy-1.5-dev19 will result in Connection: close header sent in response

I basically have the following issue: whenever I add option http-server-close to the haproxy config (either in frontend or backend section), haproxy will send a Connection: close header in the ...
1
vote
1answer
2k views

HAProxy isn't accepting reissued GeoTrust certificate

I requested a reissue of a GeoTrust certificate in light of the Heartbleed bug. We're using HAProxy 1.5-dev22 with OpenSSL enabled. I've updated OpenSSL on all affected instances. The PEM that ...
1
vote
1answer
2k views

Lot of FIN_WAIT2, CLOSE_WAIT , LAST_ACK and TIME_WAIT in Haproxy

We are running haproxy in production for around 10k+ concurrent users. But we are seeing lot of FIN_WAIT2, CLOSE_WAIT , LAST_ACK and TIME_WAIT in the netstat output. This output is on a 8G ...
1
vote
1answer
2k views

haproxy not passing X_FORWARD_FOR on HTTP POST

I've setup HAProxy with the option forwardfor option so it'll pass on the user's IP to PHP via $_SERVER[ "HTTP_X_FORWARDED_FOR" ]. If the page request isn't a POST it's populated fine but if it is ...
0
votes
1answer
77 views

Multiple Proxy servers - and how to get around non-SNI devices?

We have a lot of devices that cannot use SNI and we want to be able to proxy a lot of HTTP/HTTPS servers. I was thinking we could setup a HAProxy for each URL to connect to initially, and then load ...
0
votes
2answers
268 views

SSHD real-ip behind haproxy

I'm trying to setup an ssh over https connection using haproxy. I'm currently looking for a way for SSHD to get the source ip from haproxy, similar to reading X-Forwarded-For or X-Real-IP headers. ...
0
votes
1answer
508 views

Hostnames in HAProxy configuration file

My haproxy.cfg file has two backend servers using hostnames: server ops-ca-revealv2e-prod-1 ops-ca-revealv2e-prod-1:443 cookie ops-ca-revealv2e-prod-1 ssl weight 1 maxconn 512 check server ...
0
votes
1answer
715 views

Unable to configure haproxy with ssl

I want to make my server ssl protected, it has two parts one for website and another for application. to balance them we have used haproxy. Now we want to secure this haproxy. I have installed the ...
0
votes
3answers
1k views

Other options to “balance source” in haproxy

I have haproxy listening on several ports and pointed at several backend servers. Ideally, I would like it so that repeated communications to the same port get pointed at the same backend. "balance ...