Questions tagged [haproxy]

HAproxy is a TCP/HTTP load balancer which provides cookie-based persistence, advanced traffic regulation with surge protection, automatic failover, run-time regex-based header control, Web-based reporting, advanced logging to help trouble-shooting buggy applications and/or networks, and a few other features.

HAProxy is a TCP/HTTP load balancer which provides cookie-based persistence, advanced traffic regulation with surge protection, automatic fail over, run-time regex-based header control, Web-based reporting, advanced logging to help trouble-shooting buggy applications and/or networks, and a few other features.

2659 questions
30
votes
1 answer

What is pass-through load balancer? How is it different from proxy load balancer?

Google Cloud Network load balancer is a pass-through load balancer and not a proxy load balancer. ( https://cloud.google.com/compute/docs/load-balancing/network/ ). I can not find any resources in general on a pass through LB. Both HAProxy and…
Mohit Gupta
  • 649
  • 1
  • 7
  • 15
30
votes
3 answers

Differentiate nginx, haproxy, varnish and uWSGI/Gunicorn

I am really new to sys admin stuff, and have only provisioned a VPS with nginx(serving the static files) and gunicorn as the web server. I have lately been reading about different other stuff. I came to know about other tools: nginx :…
whatf
  • 6,378
  • 14
  • 49
  • 78
28
votes
3 answers

How can I enable HTTP/2 on HAProxy?

We have recently shifted from HTTP to HTTPS. As we have already moved to HTTPS, we are thinking of moving to HTTP/2 to get performance benefits. As explained above that requests between browser and LB are secured (HTTPS) while communication between…
ssharma
  • 521
  • 1
  • 7
  • 17
27
votes
5 answers

Duplicate TCP traffic with a proxy

I need to send (duplicate) traffic from one machine (port) and to two different machines (ports). I need to take care of TCP session as well. In the beginnig I used em-proxy, but it seems to me that the overhead is quite large (it goes over 50% of…
ufffffff
  • 271
  • 1
  • 3
  • 3
24
votes
10 answers

HAProxy cannot bind socket [0.0.0.0:8888]

I build a HAProxy on CentOS 7 and enable statistics page with port 8080. It seems work properly. When I set port as 8888, the HAProxy is not working and gives me some feedback. After that, I tried many ways to solve this problem, but the problem is…
Code Man
  • 1,428
  • 2
  • 11
  • 20
24
votes
1 answer

How to redirect URL with HAProxy

I need redirect www.foo.com and foo.com to www.bar.com in haproxy, this is my configuration: frontend http-in bind *:80 acl bar.com hdr(host) -i www.bar.com ... use_backend bar.com_cluster if bar.com ... redirect…
stecog
  • 2,202
  • 4
  • 30
  • 50
24
votes
5 answers

what is my HAProxy version?

I installed HAProxy for load ballancing before. How can I check what is my haproxy version which installed before in mu ubuntu?
sahar shokouhi
  • 681
  • 2
  • 8
  • 15
23
votes
5 answers

Elastic Load Balancing in EC2

It's been on the cards for a while, but now that Amazon have released Elastic Load balancing (ELB), what are your thoughts on deploying this solution for a high-traffic web application? Should we replace HAProxy or consider ELB as a complimentary…
Dom
  • 1,486
  • 2
  • 14
  • 22
23
votes
3 answers

How to send a response with HAProxy without passing the request to web servers

The server is receiving thousands of OPTIONS requests due to CORS (Cross-Origin Resource Sharing). Right now, every options request is being sent to one of the servers, which is a bit wasteful, knowing that HAProxy can add the CORS headers itself…
Xeos
  • 5,975
  • 11
  • 50
  • 79
22
votes
1 answer

When to use httpclose or http-server-close in haproxy

I have inherited a system where it has some performance issues due to network latency. We are using CentOS 5.x, and haproxy 1.5x The reason is that there is a lot of time spent on each API requests due to time spent on "initial connection" Ignore…
forestclown
  • 1,582
  • 4
  • 25
  • 39
22
votes
1 answer

Haproxy redirect www to non-www

I'm currently using Haproxy to balance several express.js nodes. I know that it's possible to redirect using express.js, but I was hoping to do so with Haproxy. I was wondering how I can do a permanent redirect from www.mysite.com to mysite.com?
LDK
  • 2,555
  • 5
  • 27
  • 40
21
votes
3 answers

haproxy match various conditions in use_backend

I'm trying to match various conditions inside one backend, like this: acl rule1 hdr_dom(host) -i ext1 acl rule2 utl_beg /img default_backend back-server-http if rule1 and rule2 but, how can I put this "and" between the two rules?
rfmoz
  • 991
  • 4
  • 14
  • 27
19
votes
3 answers

loadbalancing for kubernetes in non-cloud environment

I see that kubernetes can use ClusterIP and NodePort and LoadBalancing. For loadbalancing it requires cloud. If I do not have cloud provider how can I loadbalance traffic between nodes?! I know that HAProxy can loadbalance but I think this cloud…
yasin lachini
  • 5,188
  • 6
  • 33
  • 56
19
votes
3 answers

What is the significance of set_serial option while generating client certificate?

What is the significance of set_serial option while generating client certificate. # client certificate creation openssl genrsa -out client1.key 1024 openssl genrsa -out client2.key 1024 openssl req -new -key client1.key -out client1.csr openssl req…
18
votes
2 answers

Load Balancing (HAProxy or other) - Sticky Sessions

I'm working on scaling out my app to multiple servers, and one requirement is that a client is always communicating with the same server (too much live data is used to allow bouncing between servers efficiently). My current setup is a small server…
Michael Marsee
  • 1,075
  • 2
  • 12
  • 11