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

HAProxy switch to backup on 500 errors and/or server down

I'm setting up an HAProxy in front of only 2 backend servers, with a particular configuration: any request should go to server A; but, if server A returns a 5xx error code, all request should go to a backup server B. When A returns "up", all the…
8
votes
1 answer

HAProxy URL rewrite on 404 error

How to make HAProxy rewrite to a different back-end when the first is missing the file? What I need is errorloc but making a rewrite instead of redirect, so the client is not aware of redirect. We have developed an application with NginX in mind,…
8
votes
1 answer

Configure haproxy to return a 204 for a certain ACL match

I want to return a HTTP 204 error code if anyone tries to access a particular path on my web server. I could set one of my webservers to return a 204 error and point haproxy to it as a backend. However since no information is being sent, I figured…
TomOnTime
  • 7,945
  • 6
  • 32
  • 52
8
votes
3 answers

HAProxy and Intermediate SSL Certificate Issue

We are currently experiencing an issue with verifying a Comodo SSL certificate on an Ubuntu AWS cluster. Browsers are displaying the site/content fine and showing all the relevant certificate information (at least, all the ones we've checked), but…
Sam K
  • 191
  • 1
  • 1
  • 5
8
votes
1 answer

HAProxy set acl with hosts from file

I'd like to migrate some 100+ sites from one server to another. Current plan is to gradually add an acl for each as they are moved to direct traffic to a new server. Here is a simplified example front http_frontend bind *:80 acl is_new…
joevallender
  • 191
  • 1
  • 1
  • 7
8
votes
1 answer

Set header key based on SSL ID

Is there a way to set a header key based on SSL ID value with HAProxy 1.5? We would like to use the SSL ID as the session ID for clients who do not support cookies.
mgutz
  • 81
  • 1
8
votes
1 answer

What does "acl cdn_name hdr_beg(host) -i foor.bar.com" mean in HAProxy's configuration?

I've recently taken over an environment using HAProxy, and I'm attempting to learn the config and what it all means, but I'm finding some aspects of it are not clear. I think the above means that if host header begins with "foo.bar.com" then use…
8
votes
2 answers

Using nginx to rewrite urls inside outgoing responses

We have a customer with a site running on Apache. Recently the site has been seeing increased load and as a stop gap we want to shift all the static content on the site to a cookieless domains, e.g. http://static.thedomain.com. The application is…
Kev
  • 7,877
  • 18
  • 81
  • 108
8
votes
4 answers

Advantages of Using Nginx or HA Proxy as Load Balancer

In our environment we us both Nginx and HA Proxy on different clusters. Are there advantages of using one over the other? Or, what is the best way to go about load balancing a basic LAMP server cluster?
Jason
  • 83
  • 1
  • 3
8
votes
4 answers

haproxy BADREQ errors

I am seeing errors similar to the following in my haproxy logs: Jul 18 17:05:30 localhost haproxy[8247]: 188.223.50.7:51940 [18/Jul/2011:17:05:24.339] http_proxy_ads http_proxy_ads/ -1/-1/-1/-1/6001 408 212 - - cR-- 100/89/0/0/0 0/0…
electric_al
  • 81
  • 1
  • 1
  • 3
8
votes
1 answer

Haproxy load balancing with HTTP Headers

We're using HAProxy to load balance our websocket and comet application. There is one HAProxy and 3 applications running in the back. We use HTTP Basic Auth (and we will use other types of auth in the future, like OAuth) to identify the connected…
Julien Genestoux
  • 609
  • 8
  • 19
8
votes
2 answers

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 running (usually 10-15 hours) TCP connections to our…
TJF
  • 391
  • 1
  • 6
  • 15
7
votes
6 answers

How many reverse proxies (nginx, haproxy) is too many?

I'm setting up a HA (high availability) cluster using nginx, haproxy & apache. I've been reading great things about nginx and haproxy. People tend to choose one or the other but I like both. Haproxy is more flexible for load balancing than nginx's…
Alysum
7
votes
1 answer

How does one forward a client authentication certificate through HA proxy while terminating TLS?

I have a web API fronted by an HA Proxy load balancer. The web API uses client authentication certificates for identity authentication and authorization. I'd like the HA Proxy appliance to terminate the TLS connection and use normal HTTP on the…
Matt Hamsmith
  • 183
  • 1
  • 7
7
votes
2 answers

Route Docker container traffic through another container

I'm trying to route tcp traffic of container B (10.10.1.2, custom binary using mysql and running on port 4242) through container A (10.10.1.3, haproxy, setup in transparent proxy mode) to the outside world, they share the same user defined docker…
Tuxity
  • 71
  • 1
  • 4