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

HAProxy authenticated httpchk (health check)

I am using HAProxy on EC2 and using httpchk to manage node availability. I had used a pseudo-unique path as the health check route in an attempt to make sure only my servers responded to the health check. Earlier today I had an EC2 server fall out…
Markel
  • 51
  • 2
5
votes
2 answers

Is there any way to dynamically change haproxy weights according to backend server utilizations?

Is there any utility which helps modify backend server weights based on backend server utilization ? ( e.g feedbackd used to do this for LVS loadbalancer)
aab
  • 61
  • 1
  • 2
5
votes
1 answer

How to set the request start time with HAProxy?

I would like to measure the time of full request stack. The New Relic capture time of the middleware (e.g. java, python, ruby) and request time (See https://newrelic.com/docs/features/tracking-front-end-time). For this, I need to configure the…
Tupy
  • 153
  • 4
5
votes
1 answer

HAProxy: session stickiness triggered by response header possible?

I'm investigating HAProxy as a possible replacement for F5. F5 is capable of persisting a session based on a response header value: when HTTP_RESPONSE { set session [HTTP::header X-Session] if {$session ne ""} { persist add uie $session …
zoli
  • 238
  • 3
  • 8
5
votes
4 answers

Need help troubleshooting intermittant TCP timeout in HAProxy

I have an application where the client connects to a server via a simple TCP based protocol over TLS/SSL. In development, this has worked great for many months while we were building our application out. Recently as we prepare for launch, I've gone…
imaginative
  • 1,971
  • 10
  • 32
  • 48
5
votes
2 answers

Load balance HTTP based on a percentage of traffic or requests?

I want to have v1 of my application in one pool and version v1.1 in another pool and then slowly ramp up the traffic going to pool two and reduce it to pool one. Can anyone show some concrete examples of doing this with HA Proxy, Varnish, Nginx or…
markba
  • 85
  • 1
  • 6
5
votes
2 answers

Nginx Retry of Requests ( Nginx - Haproxy Combination )

I wanted to ask about Nginx Retry of Requests. I have a Nginx running at the backend which then sends the requests to HaProxy which then passes it on the web server and the request is processed. I am reloading my Haproxy config dynamically to…
vaibhav
  • 121
  • 2
  • 4
5
votes
2 answers

Haproxy graceful reload

I was looking for a solution for graceful reload of haproxy. I have a nginx server running which passes requests to Haproxy and at times I reload the Haproxy configuration. But I am observing that at time of reloading all the existing connections…
vaibhav
  • 121
  • 2
  • 4
5
votes
1 answer

How to not redirect when cookie is set in haproxy?

On my site I redirect users with mobile devices to a mobile site using my Haproxy loadbalancer. I got some complaints about that and want to offer the users a link back to the "classic" portal. As not all sub-pages are available in a mobile format I…
OpenHaus
  • 71
  • 2
  • 6
5
votes
2 answers

Is it possible to remove part of a path in HAProxy in a redirect?

I'm using HAProxy to set a cookie when you visit mydomain.com/dev and redirects to mydomain.com . The purpose of this is to offer a way to visit a development version of the site instead of the production site, while keeping everything else the…
Derek Downey
  • 3,955
  • 4
  • 27
  • 29
5
votes
1 answer

Restarting Haproxy Gracefully

As per various blogs, HAproxy can be gracefully restarted using the following command: sudo haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid) TO verify this, I had set up a apache bench script which…
AKG
  • 151
  • 1
  • 2
5
votes
4 answers

ERROR 2013 when connecting to mysql via HAProxy

I am trying to use HAProxy as a load balancer for 2 mysql nodes. I have HAProxy listening on 3307 and it routes requests to the DBs on 3306. When the client is trying to connect to the Proxy (mysql -u ... -h .. -P3307 -p...) it gets the following…
A.RG
  • 81
  • 1
  • 2
  • 4
5
votes
2 answers

Can haproxy load-balance by referrer URL? (filtering a Slashdot scenario)

I have a poorly performing web app that will be massively scaled out to cope with the weight of the internet. Haproxy will be used to farm out the stateless web requests to many servers. However, there's still a limit to the traffic that can come…
Robin
  • 173
  • 1
  • 1
  • 7
5
votes
1 answer

Is it possible to configure HAProxy to choose a backend server based on a request's source IP? If so, how?

The title pretty much says it all. Basically, I want to route a request to a specific backend server based on the request's source IP. i.e., HTTP Request from 192.168.100.1 -> HAProxy -> BackendServer A HTTP Request from 192.168.100.2 -> HAProxy ->…
John
  • 536
  • 3
  • 5
  • 13
5
votes
1 answer

Dynamic Backends with HAProxy

I'm trying to figure out the best way to handle dynamic proxying of HTTP requests. Basically I want to take a dynamic hostname in the form of myname.cust.mydomain.example and then forward requests to an HTTP backend server with the name "myname"…
Jez
  • 59
  • 1
  • 3