Search squid archive

Re: 2-gigabit throughput, 2 squids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 12, 2007 at 12:16:35AM +0200, Henrik Nordstrom wrote:
> m??n 2007-06-11 klockan 14:42 -0500 skrev Dave Dykstra:
> 
> > Two different processes
> > can't open the same address & port on Linux, but one process can open a
> > socket and pass it to two forked children.  So, I have modified
> > squid2.6STABLE13 to accept a command line option with a file descriptor
> > of an open socket to use instead of opening its own socket.  I then
> > wrote a small perl script to open the socket and fork/exec the two
> > squids.  This is working and I am now getting around 230MB/s throughput
> > according to the squid SNMP statistics.
> > 
> > Does this sound like a reasonable way to do it?
> 
> Yes.
> 
> > Do you have a preferred way to do it?
> 
> Yours sound good to me. Why do it differently?

I hadn't thought of anything, I just thought you might know of another
way you liked better.

> The only thing I might do differently is to also support the passed
> filedescriptor to be passed as stdin making the startup more like how
> inetd starts such servers..

The man page and squid.conf still talk about a '-a port' command line
option to override the port number, even though it is gone from the
code.  Because of that former option, I chose '-A fd' as the option.  So
'-A 0' would work for passing in stdin.  If you like, I could make it
only work via stdin, but I don't think it makes sense to support both a
general file descriptor option and a separate one for stdin-only.  Let
me know which way you prefer.  Oh, or are you saying that squid should
check to see if stdin is a socket (with getsockopt), and if so assume it
should just use it?


> > If I cleaned up my patch and submitted it, is there a
> > chance it could get picked up for inclusion in the standard squid
> > distribution so I don't need to maintain it myself?
> 
> Yes. Just submit it as a enhancement request in bugzilla, or mail
> squid-dev@xxxxxxxxxxxxxxx
> 
> Regards
> Henrik

Thanks,

- Dave

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux