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

How to add custom header containing the absolute address of the originally requested resource

I have the following setup: |-------|--- backend1:8080 example.com:80---|HAProxy|--- backend2:8080 |-------|--- backend3:8080 I would like to configure the HAProxy to add a custom header containing the original…
Darin Dimitrov
  • 223
  • 1
  • 2
  • 8
11
votes
6 answers

HAproxy 503 Service Unavailable No server is available to handle this request

I'm new to this load balancing scenario and I'm being tasked to figure out how to make this load balancing works. My environment: Centos 6.4 64 Bit Webserver: Lighttpd All running in ESXI virtual IP: 192.168.1.6 LB1: 192.168.1.4 LB2:…
Le Dude
  • 381
  • 2
  • 6
  • 14
11
votes
5 answers

haproxy - pass original / remote ip in tcp mode

I've got haproxy set up with keepalived for load balancing and ip failover of a percona cluster, and since it works great I'd like to use the same lb / failover for another service/daemon. I've configured haproxy this way: listen my_service…
Vito Botta
  • 327
  • 1
  • 7
  • 14
11
votes
2 answers

hardware recommendations for HAProxy for a small or medium traffic site

I am interested in setting up HAProxy for use as a load balancer for a set of small traffic web applications. The use is growing and might become medium sized in the near term (6 months or so). Mainly we are looking balance load becuase some…
MikeJ
  • 1,381
  • 4
  • 13
  • 24
10
votes
3 answers

Load Balancing DNS Servers: UDP / TCP

I have been asked to rebuild our load balancing infrastructure in the data center. The original request was to load balance FTP servers. I tried doing that using the current load balancer (Piranha / LVS), but didn't get it up and running. Not just…
Mosh Pit
  • 339
  • 2
  • 4
  • 13
10
votes
2 answers

HAProxy with SNI and different SSL Settings

I have HAProxy for my two sites, one of them public and one private. www.mysite.com private.mysite.com Atm, I'm using haproxy like this: frontend mysite_https bind *.443 ssl crt /etc/mycert.pem ca-file /etc/myca.pem verify optional no-sslv3 mode…
mohrphium
  • 645
  • 2
  • 9
  • 17
10
votes
1 answer

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 error gracefully restart haproxy when all "in process"…
Kladskull
  • 1,255
  • 5
  • 15
  • 32
10
votes
2 answers

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 ops-ca-revealv2e-prod-2 ops-ca-revealv2e-prod-2:443 cookie…
Naijaba
  • 203
  • 1
  • 2
  • 6
10
votes
1 answer

HAProxy health checks: using httpchk and observe?

I'm using HAProxy 1.4.18 with the following backend configuration backend staging option httpchk HEAD /check.txt HTTP/1.0 http-check disable-on-404 default-server error-limit 1 on-error mark-down server staging01 x.x.x.x:80 check observe…
ouranos
  • 416
  • 1
  • 3
  • 7
10
votes
4 answers

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 from the haproxy website. However, the…
Chris Lercher
  • 4,152
  • 9
  • 35
  • 41
10
votes
2 answers

HAProxy roundrobin weights

I'm attempting to modify my current haproxy configuration to favor 1 server over the others (70%,15,15) Does anyone know if this is possible? Reading the docs I see a "weight" option, but I'm a bit weary of messing around with production…
uid_b
9
votes
6 answers

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 uses file-based sessions. The nature of the site…
wherestheph
  • 233
  • 3
  • 5
9
votes
2 answers

Configure HAProxy to include host headers for different backends

I am exploring the use of HAProxy as a balancer in front of a set of web apis that run on IIS. node1.myapp.mycompany.com node2.myapp.mycomapny.com We are currently using Host Headers to correctly resolve the right web application on IIS. For…
Matt
  • 3,241
  • 9
  • 30
  • 33
9
votes
2 answers

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 presence of a cookie. For example: There is a HAProxy server and 2 web servers (serverA and serverB). When someone logs in, a cookie is created…
King
9
votes
1 answer

Haproxy: SSL encrypted backend with self-signed cert

I'm working to configure HAProxy such that it will terminate the SSL so there's only one place to configure the purchased SSL cert. However, I'd prefer that the connection to the backend servers also be encrypted with SSL. One suggestion I found…
Joe J
  • 233
  • 1
  • 2
  • 6