HAProxy is a 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.

learn more… | top users | synonyms

0
votes
0answers
7 views

Backend server selection based on cookies priorities.

I am using haproxy 1.6.5 on debian 8.3. I have 4 backend servers. They all do the same thing but diveded to 2 clusters. It is desired to keep session within 1 cluster even if one of the servers in ...
2
votes
1answer
34 views
+50

Autoscaling containers through consul and registrator

I am using an infrastructure platform consisting of docker containers running on centOS host. Scaling multiple containers through docker compose. Consul for service discovery. Registrator for ...
2
votes
2answers
5k views

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 ...
1
vote
1answer
18 views

reconfiguring haproxy backend dynamically

My requirement is to have ~50 haproxy http backends, which will be added and removed dynamically (without my involvement) anywhere on the internal network. I can assume that each http backend knows ...
2
votes
1answer
15 views

Add a mysql check to haproxy

I'm attempting to add a mysql check for haproxy in which if the service wasn't available it would return an error page just as the below config does with the http servers. I'm just not sure of the ...
1
vote
1answer
11 views

Haproxy http-buffer-request not working

I can't get Haproxys http-buffer-request option working. I'm using Haproxy 1.6.5. This is my configuration: global maxconn 20000 debug defaults HTTP mode http option http-buffer-request # ...
0
votes
2answers
2k views

HAProxy max session limit

I have an Amazon OpsWorks stack running HAProxy (balance = source) and several node.js instances running socket.io. It seems HAProxy determines the max session limit for a given instance based on the ...
5
votes
1answer
4k views

HAProxy: Display a “BADREQ” | BADREQ's by the thousands

My HAProxy Configuration. #HA-Proxy version 1.3.22 2009/10/14 Copyright 2000-2009 Willy Tarreau <w@1wt.eu> global maxconn 10000 spread-checks 50 user haproxy group haproxy ...
1
vote
1answer
14 views

Add a server to haproxy with initial state

Whenever I update my haproxy configuration to add a node, haproxy adds it in the UP state by default. With the next health check, it is marked as down. Is there a way to add a node in the DOWN or ...
1
vote
1answer
39 views

HA Proxy ACL on domain name and context name

I have request coming from different URLs like https://example1.com/context1 https://example1.com/context2 https://example2.com/context1 https://example2.com/context2 There might be multiple ...
1
vote
1answer
3k views

haproxy transparent mode on 14.04

As per my previous question SSHD real-ip behind haproxy - I'm now attempting to setup HAProxy to transparently pass the IPs to the backend services. tproxy modules loaded / and supported in haproxy (...
0
votes
1answer
15 views

HaProxy Listen for both MySQL and HTTP

I realise that using HAPROXY for databases and servers works better if the database servers are external and separate but is it possible to have 2 servers replicating database and files to each other ...
3
votes
3answers
3k views

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 ...
1
vote
1answer
2k views

Server's maxconn parameter in haproxy

I'm using HAProxy in production to balance queries to a series of server instances that can only process 1 query at a time (by our own decision). Knowing that I set the maxconn parameter in the server ...
3
votes
1answer
1k views

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 ...
0
votes
1answer
22 views

Integrating Web Application Firewall into this architecture

I need some help figuring out how to implement a Web Application Firewall (WAF) in my existing architecture. Currently I have 2 HAproxy servers clustered using keepalived which are responsible for ...
0
votes
1answer
41 views

How can I configure an HAProxy server running behind a firewall?

I am having trouble with the following: I am setting up an HAProxy load balancer on CentOS 7 behind a firewall. The firewall on the HAProxy server as well as the outside firewall are configured so ...
1
vote
1answer
42 views

haproxy 1.5 specific source IP address show <NOSRV> 503 SC in haproxy log

I have an unusual problem (as everyone does on this site). I have HAProxy listening on port 80 and 443. I am offloading SSL encryption to HAproxy and passing all traffic to my web servers on port 80. ...
0
votes
0answers
21 views

HAproxy domain name to backend mapping for path(url) based routing

Does HAProxy support domain name to backend mapping for path based routing. Currently it does support maps for vhost: frontend xyz <other_lines> use_backend backend1 if { hdr(Host) -i ...
1
vote
1answer
19 views

Why is haproxy ignoring the ssl keyword on a backend?

I'm trying to setup backend servers with ssl between the LB and the Server (172.16.12.34 is hosting http and https on the standard ports) backend test balance source option httpchk ...
2
votes
0answers
34 views

How to set up authentication server before request reach API server using HAProxy?

I want a set up that would force all requests to be authenticated before reaching the application server. I'm seeing HAProxy support basic HTTP Authentication but I couldn't find any info about making ...
1
vote
3answers
1k views

Zabbix_server.log says [2006] MySQL server has gone away

Environment CentOS 6.6, Zabbix 2.4 DB MySQL Galera cluster with 3 nodes mysql-wsrep-server-5.6-5.6.23-25.10.el6.x86_64 galera-3-25.3.10-2.el6.x86_64 Errors [Z3005] query failed: [2006] MySQL ...
0
votes
0answers
8 views

Haproxy log in with more precision

Using Haproxy, is there a way to log Tq/Tw/Tc/Tr/Tt values (HTTP mode) with more precision? (or in different units than milliseconds, e.g. in microseconds)
0
votes
0answers
37 views

Squid proxy behind Haproxy

In my configuration, I use Haproxy mainly for reverse proxy. I installed Squid Proxy in my private lan and I can access it from external with port 3128. But I use the basic authentification ncsa and ...
1
vote
3answers
3k views

HAProxy - putting up a maintenance page

Is there an easy way to dissable All backends in haproxy, and instead serve an appropriate maintenance page (for http requests)? I've read a little about the dissabled option, which I understand is ...
2
votes
1answer
4k views

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 ...
0
votes
0answers
16 views

HAProxy - How to raise the log level of responses with status code above 400

Here's my sample configuration: frontend www-http bind *:80 acl status_error status ge 400 http-response set-log-level err if status_error default_backend www-backend backend www-...
1
vote
1answer
138 views

How to share local IP within a cluster if server is bound to one IP?

I have a cluster with 3 nodes running in VMs on test setup. Now I want to take it to production and rented 3 dedicated root servers at Hetzner Online connected by a switch. As I found out, they do ...
2
votes
2answers
318 views

Can Haproxy work with SSL if I use only roundrobin?

I've been reading about load-balancing with HaProxy and was wondering if you can use this load balancer if I don't do any layer 7 processing? I suppose that using only roundrobin at TCP level load-...
2
votes
2answers
326 views

Using Lets Encrypt SSL for multiple Apache servers with distributed traffic

I'm having some issues setting up Let's Encrypt for a couple websites that are setup on two different servers, and have the traffic distributed to them via HAProxy. The servers have a number VHosts/...
1
vote
0answers
28 views

Capture and forward extended PKI cert attributes (e.g. UPN) using haproxy

I'm trying to pull an attribute from a client certificate in a mutual authentication scenario and set it as a HTTP header in the request to backend. See fig 1 below. fig1 [user with correct ...
0
votes
0answers
17 views

HAproxy ssl re-encryption and http header modification

I want to use my Haproxy 1.6.5 as Https load balancer before my https servers but I stuck with a problem of misunderstanding . I want this behaviour: haproxy is available as https://example.com but ...
1
vote
0answers
44 views

haproxy with SSL in front of apache for local development

I work on a web app that regularly makes AJAX calls to a REST server that (in production) is accessed via the same domain. While developing locally, I have been redirecting REST calls to a dev server ...
1
vote
2answers
2k views

Unable to configure haproxy with ssl

I want to make my server ssl protected, it has two parts one for website and another for application. to balance them we have used haproxy. Now we want to secure this haproxy. I have installed the ...
0
votes
2answers
41 views

Load Balancing & High Availability Network Limitations

I'm in the process of coming up with a highly available Apache / MySql group of virtual servers using HAProxy Reverse Proxy & Keepalive. I'm aware that I'm going to be using a floating public ip, ...
0
votes
1answer
1k views

haproxy 503 Service Unavailable with NOSRV

Im running HAProxy with 3 Apache servers as backend servers. problem is every 2 or 3 request ive got 503 Service Unavailable error and in log files i have this message : Oct 19 14:46:57 HAProxy1-...
0
votes
1answer
54 views

Simple redirect to HAproxy backend servers

I want to configure simple redirect with HAproxy. Desired behaviour: HAProxy receives request to example.com or https://example.com and returns https webserver start page from servers list excluding ...
0
votes
2answers
32 views

Simple tool to monitor HAProxy web requests?

I'm looking for a tool that can monitor the number of requests that are going to the nodes within HAProxy to determine the need to push out another node to loadbalance the requests. Can something like ...
2
votes
1answer
1k views

Haproxy rate limiting, conn_rate, conn_cur

Tried to achieve rate-limiting on haproxy 1.5-18 with the following: frontend stick-table type ip size 100k expire 30s store conn_rate(3s) #connection rate stick-table type ip size 1m expire 10s ...
0
votes
1answer
2k views

HAProxy pgsql-check error

I use HAProxy 1.5-dev21 to load balance PostgreSQL connections over some read-only Postgresql 9.2 servers. Version 1.5 of HAProxy implements a pgsql-check option, similar to mysql-check. Here is my ...
2
votes
0answers
28 views

HAProxy, why would a replaced HTTP header have a number at the end?

Can someone explain what the "X-Forwarded-Proto2" header is in this HAProxy frontend stanza?: frontend main *:443 ... reqirep ^(X-Forwarded-Proto:)(.*) X-Forwarded-Proto2:\2 ... I understand ...
0
votes
0answers
17 views

Haproxy with mixed modes: SSL offloading and passthrough

I would like to implement the following simple scenario, all the tests I have done unfortunately have failed (bad SSL requests, error 502...): Using SSL passthrough for the top level domain (...
8
votes
1answer
720 views

HAProxy URL rewrite on 404 error

How to make HAProxy rewrite to a different back-end when the first is missing the file? What I need is errorloc but making a rewrite instead of redirect, so the client is not aware of redirect. We ...
0
votes
0answers
20 views

Monitoring HAProxy to determine need to scale

I'm learning about load-balancing and auto scaling at the moment. I have a VM running HAproxy with 3 nodes under it to distribute traffic. My endgoal is to spam it to overload number of requests it ...
0
votes
1answer
76 views

HAProxy timeouts after 1-2 minutes of load

I am switching our web load balance from Nginx to HAProxy. Currently our setup is working fine in nginx but we want to be more redundant with service checking. Our backend is Golang app. To keep ...
0
votes
1answer
17 views

HAProxy errors configuration

I have problems with my configuration HaProxy : frontend http-in bind 0.0.0.0:80 mode http #option httplog acl site1 hdr(host) -i http://XX.XX.XX.12/games/ acl site2 hdr(host) -i ...
0
votes
1answer
37 views

haproxy acl for url and url parameter

I want to create an ACL in haproxy 1.6 that allows a particular url and url parameter ONLY when they both appear at the same time. For example: example.com/url/of/page3?foo=bar I am doing this ...
0
votes
0answers
17 views

Haproxy server persistance between different domains (transparent for server)

I'am trying to keep the same backend server for my whole "session". The problem is that this "session" concerns 2 different domains. What's more - servers should not know about another's server ...
-2
votes
1answer
29 views

how to cache contents in HAProxy [closed]

global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon # ...
1
vote
1answer
1k views

haproxy forward uri to root of another server

I use a HAPROXY container as an entry point for a virtual HPC cluster. Depending on a prefix the request is forwarded to different containers. :80/foswiki/ -> :80/foswiki/ :80/kibana/ -> :80/kibana/ ...