Re: fullconn vs. maxconn?

From: Willy Tarreau <w#1wt.eu>
Date: Wed, 10 Oct 2007 10:47:54 +0200


On Tue, Oct 09, 2007 at 03:06:37PM -0700, Dan Zubey wrote:
> Hi
>
> I recently did some experimentation with dynamic maximum sessions per
> server, and I used the maxconn and minconn paramaters as per the current
> documentation.
>
> However when I ran the config file (with haproxy version 1.3.12.1)
> haproxy spat back
>
>
> parsing /usr/local/haproxy/aop.cfg, backend 'com' : fullconn is
> mandatory when minconn is set on a server.
>
>
> Is this telling me to use fullconn in place of maxconn?

No, it's a complement. When you use maxconn on a server, you basically tell it that you don't want it to get more than <maxconn> connections. Minconn indicates that under very low load, the limit is even below, and that you don't want your server to get more than <minconn> connections. Obviously, you need something to differentiate between minconn and maxconn. There enters fullconn. It determines the number of connections on the backend at which maxconn applies. Below it, you will get a proportionate value between minconn and maxconn. Above it, you server will stay bound to maxconn.

This helps slow servers to be very fast by having very low number of connections when the traffic is low, and to support traffic surge by increasing its number of connections. The fullconn determines what you consider a traffic surge.

So basically, here is the number of connections you can get on a server depending on the number of connections on the backend. "s" denotes the server, "b" the backend, and "f" the frontend :

  backend              server
0 -> s.minconn         s.minconn

s.minconn->b.fullcon s.minconn < X < s.maxconn b.fullconn->f.maxconn s.maxconn

If you graph it, you'll see a ramp.

Hoping this helps,
Willy Received on 2007/10/10 10:47

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET