Re: [squid-users] 2 Squid's sharing an access.log over nfs

From: Scaramanga <gianni@dont-contact.us>
Date: 25 Jul 2003 12:41:41 +0100

On Fri, 2003-07-25 at 12:36, daniel.jarboe@custserv.com wrote:
> Are there any reasons for 2 squid servers to not share the same
> access.log over nfs? We're considering a round-robin dns to balance
> squid load over multiple servers. Currently there is no caching of any
> kind being done. I'm not sure what kind of write buffering is being
> done, if it'd be broken up by \n's, or how nfs might affect that. Has
> anyone tried running two squid's sharing the same access.log over nfs?

It is practically impossible to make this work 100% on a local disk,
never mind over NFS. UNIX just isn't designed with this in mind.

By default stdio will use full buffering for regular files. You could
try patching squid to setbuf(IOLBF) the access log in order to get line
buffering. The file is already opened O_APPEND.

But even then, if you want a reliable solution you should probably just
log to seperate files and merge them if needed.

HTH.

// Gianni Tedesco (gianni at scaramanga dot co dot uk)
"The task of socialist intellectuals and activists is to wage a struggle
in the cultural and ideological arena, as well as the economic and
political world, and in this way wrest hegemony from the ruling class"
 -- Antonio Gramsci
Received on Fri Jul 25 2003 - 05:41:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:16 MST