How to track overall activity time of every user efficiently?

I came across this question during my interview. If given a streamed data of login and logout times of every user on a platform, and we need to give reports of of every user's total activity time per day. Then how to design a system so that it can work in scenario of millions of users' data?

Comments (3)