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

How to check haproxy sni-based rule with curl?

I made simple HaProxy configuration to pass thorough traffic based on SNI field. Here is my haproxy.cfg defaults log global timeout client 50s timeout client-fin 50s timeout connect 5s timeout server 10s timeout tunnel…
Kirill
  • 245
  • 3
  • 7
4
votes
2 answers

Intermittent 504 errors with HAProxy

I've been struggling with this issue for weeks and I'm running out of ideas. I run HAProxy to proxy requests among 3 backends based on the requests' path/headers. My backends are: An Amazon S3 bucket A Node.js app (2 servers) A service called…
Pedro
  • 291
  • 1
  • 3
  • 9
4
votes
2 answers

Reverse proxy HTTP to TCP

We have a service which listens on a TCP socket for a non-HTTP request. We'd like to put an HTTP reverse proxy in front of it such that the body of the HTTP request is forwarded as the entire request to the TCP socket. We've looked at doing this…
btucker
  • 181
  • 1
  • 4
4
votes
1 answer

Connect to upstream/backend via socks5 proxy in NginX/HAProxy

I'm trying to make NginX or HAProxy use proxies while connecting to upstream URLs, something like this: Browser -> Nginx/HAProxy -- SOCKS5 Tunnel --> Remote I wonder if it's possible? Edited: Basically I would like to transparently proxy http…
skies457
  • 61
  • 1
  • 1
  • 6
4
votes
2 answers

Software Load Balancer - Forward or Redirect to the backend servers?

I am a web developer, recently a need has been created to use Load Balancer. I am new in this area. I have chosen which LB to use, its not like it matters so much, HAProxy has all the features needed for as far as I've researched. My concern is…
Festim Cahani
  • 143
  • 1
  • 7
4
votes
2 answers

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 its IP address and knows the IP address of haproxy.…
Adam Kurkiewicz
  • 141
  • 1
  • 4
4
votes
1 answer

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-backend server backend 127.0.0.1:8080 With this…
user-4859
  • 41
  • 1
  • 3
4
votes
1 answer

how to cache contents in HAProxy

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 # Default SSL material locations ca-base…
Jose
  • 51
  • 1
  • 1
  • 2
4
votes
1 answer

How to use Docker with HAProxy+Keepalived?

I want to practise in creation of high-available web-application using multiple Docker containers on one machine. I launch several web-servers within Docker containers. Say, three servers rest1, rest2 and rest3. I use Docker with HAProxy balancer,…
4
votes
0 answers

HAproxy and nginx RTMP

I am trying to use HAproxy in front of an RTMP nginx server. It does connect but it does not play the video. I have 2 servers: one with nginx using RTMP and another one with HAproxy. This is the HAproxy config: listen rtmp :1935 mode tcp balance…
miko
  • 41
  • 3
4
votes
3 answers

Route traffic to node with lowest latency in HAproxy

Is it possible to route requests via HAproxy to a server that has the lowest latency from the source IP? This seems like a much needed requirement but I can't seem to find anything. My problem is that our data center is on the West Coast of the…
rehanift
  • 81
  • 1
  • 5
4
votes
1 answer

Block specific URL in HAProxy / url-encoding

I'm trying to restrict access to a specific URL. It should not allowed to access /admin.php. frontend example acl restricted_page path_beg -i /admin\.php http-request deny if restricted_page This works fine, HAProxy is blocking access to this…
user336399
4
votes
1 answer

How well does haproxy scale for handling client certificate authentication?

As this is a performance-based question about a security issue, some folks at Information Security suggested I post here: My IoT company would like to use client certificate authentication to secure communications between each "thing" and a central…
4
votes
0 answers

Force disabled server selection when using cookie based session persistence?

Let's say I have an HTTP configuration block like so: listen testing bind 1.2.3.4:80 balance roundrobin use-server server1 if { urlp_val(force) eq 1 } use-server server2 if { urlp_val(force) eq 2 } force-persist if { urlp(offline) -m bool…
James Sumners
  • 513
  • 3
  • 7
  • 17
4
votes
2 answers

How can I get haproxy to log to systemd/journald?

I have a current generation Linux system I'd like to use with haproxy. Journald will happily log stdout from .service, and mark the log as coming from that service, but haproxy doesn't seem to be able to log to stdout. What's the simplest and…
mikemaccana
  • 3,370
  • 5
  • 25
  • 29