Hello,

I'm trying to find a way to dynamically set the maxconn of a server at
runtime, and haven't been able to find anything that seems right. I was
hoping that maybe I'm missing something, or that someone can suggest an
alternative.

I'm using haproxy internally to proxy a microservice. Haproxy runs on the
host running the microservice, with a backend containing a single server
(localhost, with the microservice port). I like this setup, primarily
because I've found that haproxy handles queueing very well with a lot of
options. I set a high maxconn on the frontend, a low maxconn on the server
and include a queue timeout so that in case the server is overloaded it can
return a 503 to the client rapidly.

This particular service needs a low server maxconn during the day, when
we're okay with lots of 503 errors but really need to avoid over-consuming
CPU. During the night, we could set a high maxconn and run the hosts at an
extremely high resource utilization. I was hoping to compute maxconn
dynamically

I was hoping to set the server maxconn with the unix control socket, but it
currently seems to only set maxconn for default or for a frontend.



Some extra info:
— we configure haproxy with chef, but I was hoping to decouple this. Hosted
chef is not always available, and sometimes we disable chef-client.


Thanks!

-- 
----
e s

Reply via email to