How to implement a db friendly visit counter ?
-
We’re currently struggling to implement a visit counter without exceeding the max_connections limit.
Our site has about two million pageviews per month. As almost every page is loaded from the cache this works fine with the current max_connections limit of 20.
Current ideas:
- Random counter which counts every n-th time and extrapolates the count.
- File based counter.
- Upgrade server.
All ideas have limits, especially the file based counter regarding concurrency and flexibility. The third one is a more long term solution.
Are there any other solutions available for this issue?
- You must be logged in to reply to this topic.