Need some feedback for an implementation that I am currently using...
I created a javascript file that is embedded into my website that sends a request every 3 seconds to an endpoint. This request has a unique identifier that is created for every new visitor. It then gets added to redis using some key like site_123_unique_identifier with a json encoded value {"load_time":189225}. The keys have a 5 second expire time and since I am using a unique identifier per each visitor, it doesn't duplicate visitors, just increases the expire time.
For our realtime dashboard, we are sending requests to our backend every few seconds and it does a get on all the keys matching site_123*. I then loop through all the redis keys it returns and run a json_decode on it and add up the values.
Would this work with sites that get over millions of views a day? If not what do you recommend as a solution, must work with ie7+[xmlhttp and not sockets]