Re: Difference between "-c" and "-x"

From: Roberto Suarez Soto <robe_at_allenta.com>
Date: Fri, 28 Mar 2008 15:57:51 +0100

El Viernes, 28 de Marzo de 2008, Brian Candler escribió:

> Now, if you consider pen like a TCP "patch panel" betwen incoming
> connections and backend servers, then -x is the maximum number of
> simultaneous patches in place at any one time. If further incoming
> connections arrive, they are accepted but not patched through until one of
> the existing patches is closed.

        Uh-oh. Then, can't there be more simultaneous connections than allowed
by "-x"? I.e., is pen unable to handle (by default) more than 507
simultaneous connections at once? This could be a problem, since we're
dealing with ~5000 potentially simultaneous connections here.

        I've been looking the pen sources to recompile it and allow many more
connections, but I'm intrigued by this part of the "INSTALL" file:

(begin quote)

To use Pen with a very large number of simultaneous connections, the
preprocessing macro FD_SETSIZE must be increased. The default value varies
between operating systems, as does the maximum supported. Pen will try to
catch attempts to run out of spec.

The select() used by Linux is broken in this respect, and doesn't
allow FD_SETSIZE to be changed from the default. The solution is
to not use Linux, or to change the #defines in the relevant include
files: <linux/posix_types.h> and <bits/typesizes.h>.

(end quote)

        So, does this mean that I have to recompile both pen and the kernel of the
server where it's running to allow for (for example) 5000 simultaneous
connections?

> > "Max. number of connections" (-x) should be the maximum number of
> > connections allowed ... per client? Or per server?
> In total. This time try:

        Aha, I understand. And it makes sense with the problem we were bumping into.
Time for recompiling, I think.

> Note that there's a third type of limit: the one you set on each backend
> server. If pen hits the limit for all backends before hitting the -x limit,
> and don't have an emergency (-e) server configured, then pen will accept
> further client connections but disconnect them instantly.

        I understand. Anyway, that's a problem that I don't think we'll hit, at least
for the moment.

> Hope this helps... I'm still working it out myself :-)

        Thanks a lot :-) There is somewhat bad news that pen doesn't work as I
thought, but at least now I'm "enlightened".

-- 
        Roberto Suarez Soto                             Allenta Consulting
        robe_at_allenta.com                                   www.allenta.com
                                                           +34 881 922 600
Received on Fri Mar 28 2008 - 15:58:03 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 28 2008 - 15:58:05 CET