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
5 answers

could not bind socket while haproxy restart

I m restarting HAproxy by following command haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid) but i get following message [ALERT] 183/225022 (9278) : Starting proxy appli1-rewrite: cannot bind…
shreyas
  • 267
  • 1
  • 3
  • 6
5
votes
4 answers

Mitigate DDoS attack with HAProxy

We were targeted earlier today by a DDoS attack. There was 20x as many connections as normal on our load balancer (HAProxy), and all the backend nodes continued to go down during this attack. System structure: HAProxy > Squid > Apache (for…
Matt Beckman
  • 1,502
  • 18
  • 33
5
votes
1 answer

How to redirect request at the haproxy level to fetch file from CDN?

For a given url pattern, I want the contents of the file to be fetched from a CDN and not from my web server. example: www.example.com/some/path/ford/new?a=1&b=2 I need to extract: ford new 1 2 I want to fetch the file from the s3 (or CDN)…
Blankman
  • 2,891
  • 10
  • 39
  • 68
5
votes
3 answers

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 source" isn't workable because often requests come…
Pricey
  • 419
  • 1
  • 5
  • 20
5
votes
1 answer

Haproxy Falling over under high volume

I am having some issues with HAProxy configuration. I have been playing around with it to try and make it more resilient to high server loads and Denial of Service. However, I felt it was working fine until suddenly I was victim of a (D)DoS attack -…
Chris
  • 1,289
  • 2
  • 18
  • 34
5
votes
1 answer

connection sync suggestions with HAproxy and keepalived

I managed to get HAproxy working in a failover configuration as suggested on the architecture.txt document using keepalived. I used CentOS 5.5, HAproxy rpm (haproxy-1.3.25-1.el5) from epel repo, and keepalived rpm (keepalived-1.1.15-0.el5.centos)…
golemwashere
  • 734
  • 1
  • 10
  • 22
5
votes
3 answers

Logging haproxy check results / problems

how can I enable logging of haproxy check results (or failures only)? I've seen some mailing list posts suggesting this is possible: Server LDAPSFarm/LDAPS1 is DOWN, reason: Socket error, check duration: 277ms. 1 active and 0 backup servers online.…
viraptor
  • 1,296
  • 6
  • 21
  • 41
5
votes
1 answer

Is it possible to use one haproxy process to load-balance more than one protocol/port?

I've got haproxy to work for us. But right now there are two haproxy processes running. One for HTTP and the other for TCP (RTMP). I've tried to configure both proxies in one configuration file but haproxy only handles HTTP then. My configuration…
Jan Deinhard
  • 2,383
  • 5
  • 26
  • 33
5
votes
5 answers

Install HAProxy 2 on Centos 7

Where can I find official documentation on HAproxy 2x installation documentation for Centos 7? $ yum install haproxy $ haproxy -v HA-Proxy version 1.5.18 2016/05/10 Copyright 2000-2016 Willy Tarreau $ cat…
MiddlewareManiac
  • 153
  • 1
  • 1
  • 5
4
votes
1 answer

How to get HAProxy to route TCP based on SNI (using openssl s_client to test)?

I want to use HAProxy to terminate TLS-encrypted TCP connnections and to pass the unencrypted TCP traffic to various backends based on the Server Name Indication used to initiate the TLS connection. I have 3 services running on a backend server,…
John
  • 263
  • 1
  • 2
  • 11
4
votes
2 answers

haproxy how to process /.well-known before any redirects?

I want to create a haproxy configuration that listens on port 80 and: use_backend when the path starts with /.well-known/acme-challenge, regardless of domain redirect http to https for other paths for several domains, e.g. a.test to…
user13097
  • 221
  • 2
  • 7
4
votes
1 answer

Receiving BADREQ 400 errors on HaProxy?

I have been getting a sizeable number of BADREQ entries in my HAProxy log (10+ per minute). Example: Oct 1 19:46:00 LB haproxy[19022]: 69.171.251.8:57356 [01/Oct/2018:19:46:00.903] sitename sitename/ -1/-1/-1/-1/5 400 187 - - PRNN 19/19/0/0/5…
Wayne
  • 73
  • 1
  • 11
4
votes
2 answers

how to configure postfix behind haproxy?

During the last years I had an emailserver running for my small business without problems. Now that my company has grown, I wanted to add a bit of redundancy and added a failover emailserver with a loadbalancer in front (haproxy). All went fine…
Joe Silencio
  • 41
  • 1
  • 1
  • 6
4
votes
2 answers

Haproxy backend stays down and is never brought up again

It works fine up until the moment the remote server becomes unavailable for some time. In which case the server goes down in the logs and is never brought up again. Config is quite simple: defaults retries 3 timeout connect 5000 timeout…
Rihad
  • 41
  • 1
  • 3
4
votes
1 answer

HAProxy - Add response header based on request host

I have a HAProxy set up to redirect traffic to a few internal servers. What I'm trying to do is to set some response headers, based on the request host. Unfortunately I can't get it to work. Current settings look like this acl mywebsite…
elmo
  • 55
  • 2
  • 8