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

How to configure HAProxy for multiple SSL-Certificates

I need to configure HAProxy with two different SSL-Certificates www.example.com api.example.com Now I learned from a post on serverfault ( Configure multiple SSL certificates in Haproxy ) how to use 2 certificates, however the server continues to…
merlin
  • 2,093
  • 11
  • 39
  • 78
9
votes
1 answer

Haproxy setup with subdomain setup

Hoping someone can help confirm if this suppose to work? I'm trying to route 3 subdomain traffic to the same haproxy host; Here is my setup haproxy with one interface ip 10.10.10.100 and dns name haproxy01.mydomain.com 3 CNAME records associated…
Global Learning
  • 93
  • 1
  • 1
  • 3
9
votes
1 answer

Haproxy: reject traffic by user agent from file

I am trying to reject connections from specific user agents (by matching a substring of the user-agent header) using an haproxy ACL with -f option to read from a file. However it is not working, it runs as if the configuration is being ignored. Can…
raugfer
  • 221
  • 1
  • 2
  • 5
9
votes
1 answer

Haproxy "use_backend" match order

I have a problem with HAProxy, it's a snippet of my haproxy.cfg below, acl url_a path_beg /a acl dom_eye hdr_dom(host) -i www.mydomin.com use_backend eye1 if dom_eye use_backend eye2 if dom_eye url_a when i visit www.mydomin.com/a, it use eye2…
glancesx
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

Proxying TCP by hostname

I've got multiple game servers TCP ports on my single host machine. The goal is to have users be able to connect to server1.domain.net and have their directed based on that subdomain. My first instinct wrote the following but then I realised that…
shaun m
  • 363
  • 1
  • 2
  • 8
9
votes
4 answers

Dead gateway detection on Windows 2008 Server

We have recently implemented HAProxy for stackoverflow.com. We decided on using TProxy to maintain the source address for clients connecting so our logs and other IIS modules which depend on the client IP address would not require modification. So…
Geoff Dalgas
  • 2,476
  • 5
  • 31
  • 32
9
votes
2 answers

Scale HAProxy for more than 64k websockets

We are trying to design an architecture that will be able to handle more than 64k websockets. We first tried with Amazon ELB, but its design doesn't allow unexpected spike of traffic nor websocket. (TCP mode timeout the websockets unexpectedly) With…
Bastien974
  • 1,896
  • 12
  • 44
  • 62
9
votes
2 answers

HAproxy 1.5 Trusted CAs

I'm trying to get HAproxy 1.5.x to trust any certificate authority already in the trust store of the machine (/etc/ssl/certs) without having to explicitly specify the individual ca-file root authority certificate to be trusted. I want to avoid the…
Jonathan Oliver
  • 329
  • 1
  • 3
  • 13
9
votes
1 answer

Using URL parameters for load balancing with HAProxy

I have a system which is load balancing via a cookie, but I want to use a URL parameter as an alternative. (Specifically, I have a front end app which does not support cookies). My setup is a little complex - I have a multiplayer system and I use…
Will Glass
  • 927
  • 2
  • 12
  • 21
9
votes
1 answer

How can I make nginx always return a HTTP 503?

I am using HAproxy in front of an app that is on multiple other servers. I would like to set up a vhost in a local nginx instance that only serves a 503 for every request (to use as the 'backup' server when all backends are down). I know how to set…
Dave Forgac
  • 3,546
  • 7
  • 37
  • 48
9
votes
1 answer

How to block IP addresses in HAProxy?

Is there something like Apache "deny from ip" in haproxy?
Marcin
  • 613
  • 4
  • 8
  • 15
8
votes
2 answers

Blocking IPs in HAProxy

A client's website is currently under attack, and I've been called in to fix it. A huge number of IPs (easily over 5,000) is constantly hitting /login, presumably trying to bruteforce their way in. I've changed the site so the page returns a 500…
Grim...
  • 381
  • 1
  • 2
  • 9
8
votes
1 answer

HAProxy 1.7 Statistics Setup

I've tried multiple web tutorials for enabling HAProxy stats (just google haproxy statistics and try the top 10 links) but I believe these are for older HAProxy versions. I'm running 1.7 on Ubuntu 16.04 LTS. Here's my /etc/haproxy/haproxy.cfg file…
user368104
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

HAProxy has no server available

I am trying to setup a very simple HTTP load balancer with node.js backends in CentOS 7. The backends are all HTTP servers. If I set both the backend to listen on port 80, and HAProxy to listen on port 80 and use port 80 on the backend, everything…
Panda Pajama
  • 399
  • 1
  • 3
  • 11
8
votes
1 answer

HaProxy - 502 Bad Gateway : HTTP spoken on HTTPS port

I'll try to explain my issue. I'm working on HaProxy 1.5.8 / apache 2.2, and I try to do some SSL configuration, but I fail, and fail, and fail. Let's see some logs: Haproxy Logs Aug 13 17:00:28 localhost haproxy[10930]: x.x.x.x - -…
Ze.Miw
  • 83
  • 1
  • 1
  • 3