On Thu, 11 Feb 2021 at 05:31, Victor Sudakov <[email protected]> wrote:
>
> Lukas Tribus wrote:
> >
> > On Wed, 10 Feb 2021 at 16:55, Victor Sudakov <[email protected]> wrote:
> > >
> > > I can even phrase my question in simpler terms. What happens if the sum
> > > total of all servers' maxconns in a backend is less than the maxconn
> > > value in the frontend pointing to the said backend?
> >
> > Queueing for "timeout queue" amount of time, and then return 503 error
>
> And what happens in TCP mode, after the "timeout queue" amount of time?
> I suppose the TCP connection with the client is reset?

Yes, that's the only choice.


>
> >
> > See:
> >
> > timeout queue
> > https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#4.2-timeout%20queue
> >
> > maxconn
> > https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#5.2-maxconn
> >
> >
> > I really suggest you ignore minconn and fullconn, and focus on maxconn
> > instead. The latter is a must-have (and must-understand). Really
> > maxconn (global, frontend and per server ) is the single most
> > important performance knob in haproxy.
>
> Maxconn is rather clear, especially when one is sure about two things:
>
> 1. A server's maxconn value is always a hard limit (notwithstanding if
> there is a minconn configured for the server).

Yes.

> 2. Connections outnumbering the sum total of a backend's servers
> maxconns are queued for the "timeout queue" amount of time and then
> dropped.

If, for any reason, we can't use another server with free slots, yes.


> It would be nice however to understand minconn/fullconn too. If a
> backend has several servers with identical minconn, maxconn and weight,
> what's the point of having minconn? The load will be always distributed
> evenly between all the servers notwithstanding minconn/fullconn,
> correct?

If the load is REALLY the same, sure. That's just never the case in
real life for a number of reasons:

- different load-balancing algorithms
- different client behavior
- session persistence
- long-running TCP connections (websocket, et all)


But yes, like I already mentioned, minconn/fullconn is addressing a
very specific requirement that I don't think comes up very often.



Lukas

Reply via email to