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:

2129 questions
53
votes
3 answers

Configure multiple SSL certificates in Haproxy

My haproxy instance serves 2 domains (mostly to avoid XSS on the main site). The rules look something like this bind :443 ssl crt /etc/ssl/haproxy.pem acl is_static hdr_end(Host) -i example.com acl is_api hdr_end(Host) -i api.example.com acl…
user22711
43
votes
2 answers

By what criteria do you tune timeouts in HA Proxy config?

When configuring HA Proxy, how do you decide what values to assign to the timeouts? I've read a half dozen samples in various blogs, and everyone uses different timeouts and no one discusses why. HAProxy seems specifically worried about client,…
27
votes
1 answer

HAProxy to terminate SSL also send SSL to backend server

I would like terminate SSL at HAProxy, do some manipulation on the header, rewrite URL and re-encrypt traffic and send to backend servers as SSL? I can't seem to find a way to do this. I can get regular SSL termination done, and send plain HTTP…
oazabir
  • 415
24
votes
2 answers

How to Read the haproxy Stats Page

For those of you using HAProxy along with the stats papge (haproxy?stats), how do I interpret this page? There is no decent explanation. For instance: Which Session column displays the number of currently active connections to the backend? Session…
w00t
  • 1,164
20
votes
2 answers

HAProxy HTTP vs TCP

HAProxy gives you the option to set the mode to TCP or HTTP. It also allows you to set the port. So why allow me to choose between HTTP and TCP, if it's letting me choose the port too? Surely if I wanted HTTP I could just choose TCP and port…
marflar
  • 397
20
votes
8 answers

Remote IP's with HAProxy

I'm testing a new web server setup which is having a couple of issues. Essentially, we have a web server, where the code uses the remote IP for some interesting things, and also some apache directories secured down to some certain IP's (our office…
19
votes
4 answers

Bind to all interfaces for IPv4 and IPv6 in haproxy

I want to configure haproxy to bind to a tcp as well as tcp6 socket on all interfaces (i.e., 0.0.0.0:80 and :::80). I was able to reach this goal with the following settings: listen web bind :80 v4v6 bind :::80 v6only Is there any shorter way…
18
votes
3 answers

haproxy and forwarding client IP address to servers

I have a problem with HAproxy. I use HAproxy as load balancer which distribute incoming http requests to 5 web servers. normally a client request's is forwarded to web servers with loadbalancer's IP. But I need clients IPs or real IPs who request…
System
  • 507
18
votes
2 answers

How can I make haproxy route requests based on URL substrings?

A load balancer is set up with two back ends. The request URI will look like the following: http://example.com/answers/submit http://example.com/tag-02/answers/submit How can I configure haproxy in such a way that the request is sent to one or the…
millisami
  • 395
17
votes
2 answers

HAProxy reload - old processes never terminated

I have HAProxy setup in TCP mode, with client/server/connect timeout of 120s. When I reload the configuration too fast, I sometime end up with multiple processes. By design, this is expected, so all established connections are drained. My issue is…
Bastien974
  • 1,906
15
votes
3 answers

haproxy timing connection diagram

I'm trying to understand more about the Haproxy timings. Below is a snippet of the timings from the Haproxy manual: Tq: total time to get the client request (HTTP mode only)... Tw: total time spent in the queues waiting for a connection…
14
votes
1 answer

HAProxy: multiple frontends, same bind

Is this possible / correct to configure multiple frontends that binds to the same port on HAProxy? frontend A bind :80 bind :2000-5000 acl rule_about_A use_backend server_A if rule_about_A frontend B bind :80 acl…
JonDoe297
  • 563
14
votes
6 answers

HAProxy - how to append client ip in X-Client-IP and X-Forwarded-For headers?

I have a problem with HAProxy server. I want to forward in header a client IP. I almost done it, but there is interesting case and I can't figure it out. I need to write client IP in 2 places in header, in X-CLIENT-IP and X-FORWARDED-FOR tag's. The…
KacproSo
  • 143
14
votes
3 answers

Logging entire POST body with HAProxy?

I'm trying to track down some problems with the way a javascript client is interacting with an application server and would like to see the entire http payload (headers, body, and everything) that is being passed back and forth. It so happens that…
12
votes
2 answers

HAProxy, health checking multiple servers with different host names

I need to load balance between multiple running servers with different host names. I cannot set-up the same virtual host on each one. Is it possible to have only one listen configuration with multiple server and make the Health Checks apply the…
Marco Bettiolo
  • 121
  • 1
  • 1
  • 6
1
2 3
27 28