I have a requirement that my site always displays the number of users who are currently online. For example, "35,741 users are currently online." This is not based on registration, just how many users are currently on my site. I tried using Session Start / Session End for this, however the end of the session is not reliable. Therefore, I get inflated numbers, as my session starts adding numbers, but the end of the session does not delete them, because it does not work.
There is no additional information to be gathered from this (reporting, etc.), she just asked for the number to appear. A very simple request that turns into a huge deal. Any help is appreciated.
EDIT:
I must indicate that I also tried to use a database for this. A simple table containing the session identifier and the last activity column. Every time I hit every page, I check to see if the session is in my database. If not, insert. If so, update the activity time. Then I run a procedure that sweeps a database that searches for sessions without activity in the last 20 minutes. This approach seems to have killed my SQL server and / or IIS. I had to restart the site.
source
share