FAQ Database Discussion Community


Can Haproxy use endpoint to determine load balancing?

haproxy
Is it possible for haproxy to ask a (REST http) Endpoint to determine, if a specific server is available for loadbalancing? See example below for our setup. If 'a' is down, the haproxy 'ha' should not use the way over 'x'. x--a / \ ha out \ / y--b ...

How can I have a custom restart script for runit?

haproxy,runit
I'm using runit to manage an HAProxy and want to do a safe restart to reload a configuration file (specifically: haproxy -f /etc/haproxy/haproxy.cfg -sf $OLD_PROCESS_ID). I figure that I could run sv restart haproxy and tried to add a custom script named /etc/service/haproxy/restart, but it never seems to execute. How...

redispatch request to default server or other server in haproxy?

tomcat,request,haproxy
I am working on haproxy configuration for my tomcats, I have two backend group , 1st backend is having two tomcat and serving request in round robin method and other backend is having only 1 tomcat. Now I want if request goes to second backeng and it is down ,...

HAproxy heartbeat throws “Task Cancelled exception” constantly when hitting API method

c#,haproxy
We are using HAproxy with the httpchk to verify that our websites are up on each server. The controller method for the httpchk method is as follows: [Route("heartbeat")] [HttpGet] [AllowAnonymous] public async Task<IHttpActionResult> Heartbeat() { return Ok(); } We see the following in the error log tons of times each...

Will haproxy ever retry a request where the upstream request has timed out waiting for a response?

haproxy
I am trying to find the exact conditions when haproxy (version 1.4) in layer 7 mode will retry an HTTP request. Its documentation for retries states: It is important to understand that this value applies to the number of connection attempts, not full requests. When a connection has effectively been...

How do I get tutum and haproxy to use SSL?

ssl,haproxy
I just purchased an SSL Certificate. It came with 1 server certificate, 1 intermediate certificate and 1 root certificate. I have my *.csr file and *.key used to create the certificates. I am using Tutum with HAProxy and there is a SSL_CERT environment variable. I read the documentation but could...

How to redirect to 404 when url is pointing to an existing folder (no trailing slash). HAproxy or mod-rewrite related

php,apache,.htaccess,mod-rewrite,haproxy
I am using HAProxy listening on 80 to send requests to a node server (port:3000) or php server (4000); I also have CSF installed which have ports 3000 and 80 available. It works okay when I browse a page at http://example.com/forum/1/page.php, but sometimes when I accidentally enter example.com/forum/1 (no trailing...

HAProxy SSL termination + client certificate validation + curl / java client

java,ssl,curl,haproxy,keytool
I would like to have SSL termination on HAProxy, using my own self-signed certificates, and to validate client access using client certificates I create. I create the server (which is also the CA) certificates the following way: openssl genrsa -out ca.key 1024 openssl req -new -key ca.key -out ca.csr openssl...

Logging in to private docker registry v2 behind haproxy

docker,haproxy,docker-registry
I am trying to set up a new Docker Registry (v2) with HAProxy. For the Docker Registry I am using the image from the docker hub and running it with docker run -d -p 5000:5000 -v /path/to/registry:/tmp/registry registry:2.0.1. And this is a subset of my HAProxy configuration: global chroot /var/lib/haproxy...

Linking containers with Mesos JSON file

docker,haproxy,mesos,marathon
I am trying to link my application container to my DB container when sending the JSON task description to the Marathon framework. I've read up on this question from last year: Linked Docker Containers with Mesos/Marathon The question is: I know Fig will be able to help me with this...

What is difference b/w HAProxy and Apache server

apache,haproxy
Hi actually we are working on load balancing and cluster environment. So we have some confusion is this both are same or any difference between them.

Global Variables not updated due to load balancing

java,load-balancing,haproxy
There are two servers running a web service and the servers are load balanced using HAProxy. Web Service does a post and updates a global variable with a certain value and another application running on the same servers will read this global value and does some processing. My issues is...

HAProxy is not load balancing due to persistent connections

go,haproxy,martini
We have a web server and a client, both written in go, that interact with each other. We want HAProxy to load balance requests between several instance of the server, but it's not working. The client will always connect to the same server while it's still up. If I look...

Haproxy configuration with sticky `app set` cookie

cookies,sticky,haproxy
I have a cookie setup by my app that represents a room. I want all users belonging to the same room to connect to the same server. With the classic cookie sticky scheme I do not want Haproxy to write a cookie for me or use the cookie value as...