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

Should I use haproxy's "linux2628" or "linux26" make target?

With the latest versions of HAProxy, simply typing make does not work, returning the following message: Due to too many reports of suboptimized setups, building without specifying the target is no longer supported. Please specify the target OS…
gparent
  • 3,601
  • 2
  • 24
  • 28
7
votes
1 answer

HAProxy, client timeouts when connecting from JDBC pool

I have a webapp (Tomcat/Hibernate/DBCP 1.4) that runs queries against MySQL, and this works fine for a certain load, say 50 queries a second. When I route the same moderate load through HAProxy (still just using a single database), I get a failure,…
guckmal
  • 171
  • 1
  • 2
7
votes
2 answers

HAProxy -- pause/queue all traffic without losing requests

I basically have the same problem as mentioned in this thread -- I would like to temporarily suspend all requests to all servers of a certain backend, so that I can upgrade the backend and the database it uses. Since this is a live system, I would…
Marc
  • 281
  • 2
  • 9
7
votes
2 answers

Haproxy not logging captured request headers with custom log format

Earlier i was not specifying a custom log format, and the captured request headers were getting printed fine. I wanted to log the unique-id-header, but could not find any way of doing so. So i copy pasted the log-format mentioned on…
Gagan
  • 71
  • 1
  • 1
  • 3
7
votes
4 answers

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 SVR255-53192.localdomain primitive failover-ip…
quanta
  • 51,413
  • 19
  • 159
  • 217
7
votes
3 answers

Overriding the X-Forwarded-For header in haproxy?

In my HAProxy load balancer, I have the following config chunks: defaults mode http log global option httplog clf option dontlognull option…
Evan
  • 307
  • 1
  • 4
  • 12
7
votes
1 answer

Using HAProxy, matching root URL only in ACL

Using HAProxy, I want to create the following setup: All requests except root (/), /articles and /blogs go to server1 All requests for root (/), /articles and /blogs go to server2 I can't figure out how to match root without relying on setting…
michaelward82
  • 251
  • 2
  • 7
7
votes
2 answers

haproxy acl - accept only from specific IPs

I've got haproxy and need to provide smtp to servers which does not have direct connection. Here is portion of my config: listen smtp 10.12.23.10:3025 mode tcp server smtp 172.30.33.12:25 #tcp-request inspect-delay 2s acl…
sashk
  • 334
  • 1
  • 9
  • 18
7
votes
1 answer

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 hitting a url called "/slow" which deliberately waits…
Sean Clark Hess
  • 273
  • 3
  • 13
7
votes
2 answers

haproxy httpchk multiple check on backend

is it possible to check two conditions on one backend? example backend web-static option httpchk GET /path/alive.php HTTP/1.1\r\nHost:\ www1.domain.com option httpchk GET /path2/alive.php HTTP/1.1\r\nHost:\ www1.domain.com …
Elgreco08
  • 228
  • 3
  • 4
  • 16
7
votes
3 answers

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 balancer, so if the main one fails the other will take…
wael34218
  • 321
  • 2
  • 5
  • 15
7
votes
2 answers

Prevent HAProxy from toggling back from fallback to master

We have Redis master-slave setup, and we want to fallback to the slave once the master failed. But if it has failed it should never toggle back, even if the master is online again. Is this possible?
grosser
  • 277
  • 4
  • 8
6
votes
1 answer

HAProxy doesn't automatically reload DNS

I've installed HAProxy 1.7.5-2 on a Debian Stretch (9) for a blue/green deployment infrastructure. HAProxy is setup in TCP mode and reloads DNS every 5 seconds but it doesn't. global log 127.0.0.1 local0 warning stats socket…
Kaymaz
  • 241
  • 3
  • 11
6
votes
1 answer

HAproxy: Run script on health check change

I have set up a haproxy configuration with a backend with two servers looking like that: ... default option log-health-checks ... mailers mta mailer smtp1 127.0.0.1:25 ... backend s_api balance roundrobin option…
mr.simonski
  • 247
  • 4
  • 13
6
votes
1 answer

HTTP request duration with HAProxy

Is it possible to monitor the duration of HTTP requests? (from the moment that the request is received by the load balancer, to the time when the response is returned to the client by the load balancer) I would like to monitor this metric in the…
collimarco
  • 264
  • 2
  • 3
  • 10