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

explanation of haproxy stats backend limit

The relevant part of my /etc/haproxy/haproxy.cfg is: global maxconn 30000 ... defaults ... frontend frontend_for_all_sites maxconn 22000 mode http bind *:80 acl acl_hostname_www hdr_dom(host) www.example.com acl…
cherouvim
  • 794
  • 3
  • 21
  • 37
7
votes
0 answers

haproxy ssl password protected private key

Usage: Haproxy as SSL termination Requirement: Our private keys are password protected and we are not allowed to remove the password for the private key Problem: If i run the following command haproxy -f /pathtoconf a password prompt is shown and…
Naresh
  • 71
  • 1
  • 2
7
votes
3 answers

Haproxy change part of url

I have an app that was renamed and I want Haproxy to redirect to the correct path while preserving the request parameters This is what I have: acl old_name path_dir -i /old_name http-request set-path /new_name/%[query] if old_name I want it to…
Hugo Marques
  • 73
  • 1
  • 1
  • 6
7
votes
1 answer

Add haproxy X-Forwarded-Host request header

I have a Haproxy instance that rewrites Host headers to internal ones using http-request set-header. http-request set-header Host internal.example However, I'd still like backends to have access to the original Host header. I think X-Forwarded-Host…
steveh7
  • 163
  • 1
  • 2
  • 6
7
votes
1 answer

haproxy sendmsg logger #1 failed: No such file or directory

I get the error: [ALERT] 342/125339 (1) : sendmsg logger #1 failed: No such file or directory (errno=2) /srv/dockervolume/haproxy/etc/rsyslog.d/49-haproxy.conf file: $AddUnixListenSocket /var/lib/haproxy/dev/log local0.*…
Karl Morrison
  • 1,621
  • 4
  • 29
  • 43
7
votes
1 answer

How to handle 1M websocket connections (Nginx/HAProxy/Amazon/Google)

What nginx or haproxy setup is suggested for target 100K concurrent websocket connections? What I think, a single nginx will not be able to take such traffic as well as concurrent connections. How should traffic to nginx/haproxy be split (DNS lvl or…
Ravi Kumar
  • 205
  • 1
  • 2
  • 4
7
votes
1 answer

log format ignored for frontend 'http-in' since it has no log address

I'm using the following haproxy.cfg from the couchdb project: global maxconn 512 spread-checks 5 defaults mode http log global monitor-uri /_haproxy_health_check option log-health-checks …
Chris Snow
  • 325
  • 2
  • 3
  • 16
7
votes
2 answers

HAProxy log outgoing requests

Currently, my HAProxy logs have information about the incoming requests: HTTP version, method, host, path, and headers. I am trying to debug my HAProxy config, and need to know what the resulting outgoing requests are, particularly the host and…
Paul Draper
  • 317
  • 5
  • 24
7
votes
1 answer

HAProxy route https SNI and http over the same port

I have an HAProxy routing HTTPS without termination using SNI. The configuration is similar to the following: frontend ft_ssl_vip bind 0.0.0.0:5000 mode tcp option tcplog tcp-request inspect-delay 5s tcp-request content accept if {…
user319862
  • 777
  • 2
  • 8
  • 20
7
votes
1 answer

Haproxy 1.5.3 / OpenSSL - Creating PEM

I have an HAProxy Server set up with the line: bind *:443 ssl crt /etc/ssl/domain.com/domain.com.pem I have the following files: /etc/ssl/domain.com/domain.com.key /etc/ssl/domain.com/domain.com.csr I have purchased a certificate from Geotrust which…
Aeisor
  • 351
  • 2
  • 3
  • 7
7
votes
3 answers

Any problems with having an active/active HAProxy setup with Keepalived

Apologies if this has been asked before, but I can't seem to find much on it. We're going to be using HAProxy to load balance our MariaDB Galera Cluster. All the articles/tutorials I have seen on this use Keepalived (or something similar) for an…
Luke Cousins
  • 387
  • 1
  • 3
  • 18
7
votes
2 answers

HAProxy not balancing server load fairly

HAProxy doesn't seem to keep the connections to the servers balanced. Keep this in mind: using HAProxy v1.3.26 5 equally balanced server specs algorithm is round robin, but no weights are applied for each server global max connections set in…
Mark
  • 71
  • 1
  • 3
7
votes
2 answers

Ignore port numbers in haproxy host header matches

Using haproxy-1.5, I have the following partial config: acl is_api hdr(host) -i api.example.com acl is_app hdr(host) -i app.example.com Unfortunately, the above doesn't match a request that looks like: GET / HTTP/1.1 Host:…
MikeyB
  • 39,291
  • 10
  • 105
  • 189
7
votes
1 answer

How to horizontally scale SSL termination behind HAProxy load balancing?

I've been looking around and no one seems to be trying to scale SSL termination the way I am and I'm curious as to why my approach seems so uncommon. Here's what I want to do followed by why: 10.0.1.1 10.0.1.2 -…
BrionS
  • 181
  • 1
  • 5
7
votes
1 answer

HAProxy Redirects and matching based off URI

I am attempting to setup a testing haproxy server that will cover 2 basic areas. Auto redirect to https if the user is using http but only if a specific uri part is not present. For example, if a user goes to http://www.test.com they would be…
rottmanj
  • 213
  • 1
  • 3
  • 6