Search code examples
amazon-cloudfrontamazon-cloudwatchaws-media-live

Is there a way to get number of concurrent users from CloudFront data?


We hosted a live event using CloudFront + MediaPackage + MediaLive. We see some metrics on CloudWatch, but there's not one for concurrent users. Is there a way to see concurrent users or an estimate of concurrent users on CloudWatch, or by downloading the data from CloudWatch?


Solution

  • The concept of "concurrent users" is always difficult for web systems because remote users simply request one page at a time. They do not logon/logoff and there is no way to know whether they will come back.

    Also, CloudFront does not have the concept of a 'user', but you could infer it from an IP address.

    You would need to write your own logic that interprets log files from CloudFront to infer 'concurrent users'. This would involve making judgements such as how many minutes to wait until a user session is deemed 'finished', then stringing-together records to determine when a user's session started and finished. It's a pretty standard thing to do for web analytics, but it's something you'd need to write. It is not done automatically for you by CloudFront.