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

HAProxy - forward to a different web server based on URI

I have an HTTP farm with the following configuration: listen webfarm 10.254.23.225:80 mode http balance roundrobin cookie SERVERID insert option httpclose option forwardfor option httpchk HEAD /check.txt…
grateful.dev
  • 378
  • 1
  • 2
  • 8
13
votes
6 answers

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 requests to a backend webservice. The service does…
GrayWizardx
  • 233
  • 1
  • 2
  • 6
13
votes
2 answers

HAproxy health check for https backend

I have haproxy configuration that works perfect for vault server in the backend with http configuration and it load balance based on unsealed and active vault server using 200 OK code. This works for http. But we make everything to be https (tls)…
Jayabalan Bala
  • 311
  • 1
  • 2
  • 8
13
votes
1 answer

HAProxy responding with NOSRV while backend is up

I have a strange situation where requests to my HAProxy are returning with a 503. HAProxy logs show it returning a NOSRV error: Mar 26 19:47:01 localhost haproxy[23910]: 10.0.0.30:34261 [26/Mar/2013:19:46:48.579] fe v2/
Raj
  • 266
  • 1
  • 2
  • 10
12
votes
1 answer

Is it possible to redirect an https connection before SSL is checked using haproxy?

I have two domains, myexample.com and my-example.com. I want all traffic for either domain to go to https://www.my-example.com, for which I have an SSL certificate. I do not have an SSL certificate for the domain myexample.com. I have…
Ben Holness
  • 944
  • 2
  • 10
  • 28
12
votes
1 answer

Haproxy - timeout http-request vs timeout http-keep-alive vs timeout server

I'm trying to wrap my head around how the haproxy options timeout http-request timeout http-keep-alive timeout server interact with each other. I'm running an Apache website on two app servers living behind a haproxy…
Mike Levy
  • 255
  • 1
  • 3
  • 7
12
votes
6 answers

Best way to load balance across multiple static file servers for even an bandwidth distribution?

First off, I'll explain my situation to you. I'm running a fairly popular website as a side project, so I can't really invest a ton of money into it. I currently have just one server with HAProxy in the front sending out normal requests to Apache,…
Alan
  • 338
  • 1
  • 3
  • 10
12
votes
3 answers

nginx access logs ignore certain requests

I'm running nginx behind haproxy (running on the same server). I've configured haproxy to use a simple html file on nginx to verify the service is up, since I don't have/want a valid "/" URL on this host. Nginx doesn't support the OPTIONS request…
Michael Marano
  • 151
  • 1
  • 1
  • 4
12
votes
1 answer

haproxy: retain existing sessions under high load, serve '503' to new arrivals

Trying to do what it says in the title: retain existing sessions under high load, and serve 503-message to newly arrived visitors. Problem: it works, but the sessions don't last beyond about 90 seconds. Current results have me wondering if there's…
Apenootje
  • 123
  • 5
12
votes
3 answers

Should Nginx be at the front of HAProxy or opposite?

I have little experience in web site infrastructural architecture design. I know it might be situation specific. The web site is supposed to: 1) Need HTTPS support for some page (e.g. login page) while others are just HTTP page. 2) Need multiple web…
Morgan Cheng
  • 2,114
  • 2
  • 16
  • 13
11
votes
1 answer

How to add response headers with HAproxy 1.6 based on request URI?

I use HAproxy 1.6 as load balancer in front of tomcat servers. I need to add response headers based on the request URI. For e.g., I'd like to add the response header Cache-Control public,max-age="600" when the request uri is /api but not when the…
jmlrt
  • 113
  • 1
  • 1
  • 7
11
votes
1 answer

haproxy CD flags with browser, not with curl

Issuing the same url request, from the same workstation to the same haproxy server: with a browser (tried Chrome and Firefox): haproxy log shows CD flags with curl: haproxy log shows -- Both requests get a full answer back - no data is…
cornuz
  • 437
  • 1
  • 7
  • 17
11
votes
2 answers

nginx try_files redirect using wrong scheme when behind SSL termination load balancer (haproxy)

I have an nginx 1.6.2 server running as a backend behind a load balancer that does SSL termination. All communication to the backend servers goes over HTTP. Diagram of what's going on: /--http---> frontend:80 --\ client --+ …
mutron
  • 111
  • 1
  • 4
11
votes
1 answer

Direct several subdomains to a single backend with haproxy

I'm using haproxy to direct route for several applications running on a single server. For one of the domains in use there are several dozens of subdomains that should be directed to one of a few applications. Currently, I list all of those…
Hubert OG
  • 225
  • 1
  • 2
  • 6
11
votes
2 answers

HAProxy, health checking multiple servers with different host names

I need to load balance between multiple running servers with different host names. I cannot set-up the same virtual host on each one. Is it possible to have only one listen configuration with multiple server and make the Health Checks apply the…
Marco Bettiolo
  • 111
  • 1
  • 1
  • 6