FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.
Knowledgebase: Stats/Logs
Visitors by country?
Posted on 31 January 2004 07:11 AM
Question:

Could you explain why the Hits by Country feature in my account statistics doesn't seem to be working?

Answer:

The reason that HostNameLookups is not on, is due to performance reasons. DNS was not written to be fast, but rather scalable. When a request is made for your web page, Apache must put the delivery of your web page on hold while it sends out a DNS IP lookup request. This can present severe delays to the delivery of your content and also tie up extra Apache resources during the delay...

We used to post-process the log files and reverse resolve the IP's before piping them through our STATS analyzer - but this increased our 2 hour STATS run to 12 hours as we are dealing with an aggregate of 2.5 _Terabytes_ of processed log files... The impact is just too steep and unrealistic for the convenience of 'Country Stats'. If you really need them, then the option of your post-processing them is always available.

We are looking at overhauling our entire STATS system, and putting into place 6 or more multi-server spread of DNSCache resolvers just for this purpose. To date, this project is not complete yet - but plans are underway to solve this massive processing problem.

In the meantime, we would recommend asking the other Site Owners in the Community Forums about third party applications that they have successfully used in this area as they may be able to offer some recommendations on external log analyzers to you:
http://www.FutureQuest.net/forums/