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

HAProxy SSL Connection

We are using HA-Proxy version 1.5.11 2015/01/31, and from yesterday we noticed that all the request to our service over https is very slow. From the Chrome Developer Console, we can see the following timings: Initial Connection 7.59s SSL 6.42s We…
Sundar
  • 153
  • 4
5
votes
2 answers

Haproxy redirect based on path

Similar to HAProxy reqrep remove URI on backend request. The following concerns apply for us. We have applications which were running with different context roots off one domain. However not all clients of the urls were changed. I would like to…
Wes
  • 201
  • 1
  • 3
  • 8
5
votes
1 answer

Haproxy balancing - retry with another server if first timed out

We are running multiple backend servers with fastcgi protocol and we balance between them using HAproxy. Here is a sample of config: listen Balancer 192.168.0.1:2000 mode tcp option tcplog timeout connect 2000 timeout server 2000 …
j99
  • 51
  • 1
  • 1
  • 3
5
votes
2 answers

Is there any reason *not* to run HAProxy in a Docker container?

Will performance and/or stability suffer if I run HAProxy (or Nginx) in a container vs installing it directly on the host?
iZ.
  • 201
  • 3
  • 5
5
votes
2 answers

Is there a way to rate limit connections with HAProxy using multiple thresholds

I've implemented simple rate limiting using HaProxy in a similar fashion to the way StackExchange does it with HaProxy. I'm trying to make it a bit more advanced so that there are multiple thresholds of rate limiting. For example, limit clients that…
palehorse
  • 4,299
  • 5
  • 29
  • 27
5
votes
1 answer

Proxy dropping custom headers with https

Problem : With HTTPS requests my proxy is dropping custom headers from the response : HTTP request : $ curl -I -x 127.0.0.1:5566 http://www.google.fr HTTP/1.1 200 OK ... X-Servedby: 50001 => My custom header is added to the response full response :…
vdaubry
  • 151
  • 4
5
votes
4 answers

HAProxy returns Bad Request (Invalid Host) for seemingly no reason

I've been trying to test a setup that looks like this: Website: Http GET Request -> Nginx -> HAProxy -> .Net application I've placed Nginx and HAProxy on the same Debian machine. However, HAProxy constantly returns "Bad Request (Invalid Host)". I've…
David
  • 223
  • 1
  • 3
  • 5
5
votes
2 answers

Can HAProxy select a backend based on a lookup table?

Let's say I have items A, B, and C. I have two backend servers: server01 and server02. Item A can be handled by server01, item B and C can be handled by server02. New items and servers get added and removed, and we programatically update a hash…
kvz
  • 402
  • 4
  • 15
5
votes
2 answers

Implementing TCP Sticky Sessions With HAProxy to Handle SSL Pass-through Traffic

How can we implement session stickiness in HAProxy when SSL must terminate on the backend servers? We need the stickiness because backends cannot share sessions. This is my original configuration: # SSL passthrough listen https_handler bind…
5
votes
1 answer

Disable HTTP logging for specific backend in HAProxy

How does one adjust logging level or disable logging altogether for specific backends in HAProxy? In the example below, both directives "http-request set-log-level err" and "no log" seem to have no effect - the logs are swamped with lines of…
AlexMinza
  • 73
  • 1
  • 7
5
votes
2 answers

HAProxy error: Some configuration options require full privileges, so global.uid cannot be changed

After adding the line to /etc/haproxy/haproxy.cfg as part of creating a transparent proxy, source 0.0.0.0 usesrc clientip restarting haproxy starts giving an error ~# service haproxy reload * Reloading haproxy haproxy …
Athena Wisdom
  • 213
  • 4
  • 9
5
votes
3 answers

SSHD real-ip behind haproxy

I'm trying to setup an ssh over https connection using haproxy. I'm currently looking for a way for SSHD to get the source ip from haproxy, similar to reading X-Forwarded-For or X-Real-IP headers. client config; ~$ cat…
Thermionix
  • 917
  • 2
  • 15
  • 28
5
votes
2 answers

HAProxy with SSL and sticky sessions

We're trying to set up HAProxy (v1.5.1) to use SSL. While we managed to do that, we're having some issues with the round robin settings: We do want to have stick sessions, but haproxy seems to send all sessions (from different browsers) to the same…
Ayelet
  • 151
  • 1
  • 1
  • 2
5
votes
2 answers

How to get name of server that has served request in fronted section?

I need to add server name in response HTTP headers X-Servedby. Is there any way to replace [server] with name of server that has served request? frontend front x.x.x.x:80 default_backend balancing rspadd X-Servedby:\ [server] #I need to replace…
Kirzilla
  • 563
  • 3
  • 9
  • 21
5
votes
1 answer

Use acl in backend / shrink my config

In my scenario I must switch servers based on an containing url string &mode=edit or &mode=create between my servers to balance the load. My config is created via script from about 100 different urls/ip. My current way with one frontend and 2…
Max
  • 401
  • 2
  • 4
  • 9