2

I have a cluster of Apache httpd servers. It's a load balanced cluster where all nodes serve the same, shared, content. The content itself is located on a shared storage.

I would like to setup all nodes to log (server access logs) to the same log file (again on the same shared storage), but I am concerned that this would create concurrency problems in a production environment.

Anyone knows a good guide or recommendation for setting up a logging for httpd clusters?

1
  • A why may help you get the response you need. What do you want do with the logs? May 27, 2009 at 10:36

2 Answers 2

1

I would say your concerns are correct. You already have a bottleneck with the apache children logging to the same file (or the same pipe if you use cronolog).

My suggestion would be to either log to different files (say appending the hostname to the end of the file) then summarise those files later. Alternatively if you are concerned about the overhead of logging to a network storage device, log locally, again with a unique extension then rsync the files to a central location after rolling them, and summarise.

2
  • Absolutely, also use buffered logging to help reduce logging overhead.
    – LapTop006
    May 27, 2009 at 12:45
  • Can Apache do buffered logging? I thought only nginx offered that May 27, 2009 at 13:05
0

Use logresolvemerge.pl, part of AWstats (or hack your own).

Personally, I'd log to a ramdisk on each server and merge to file every hour or so.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .