title: Static list<User> VS DataBase for Online Users in Asp.Net?
body: <p>I'm building ASP.Net MVC application "kinda Game" which <strong>deal a lot with online users</strong>.</p>
  
  <p>I made Ajax request fired every <code>"10s"</code> to some <code>Action</code> to keep user online when he keeps site open.
  this <code>Action</code> <strong>update</strong> <code>LastActivityDate</code> for this <code>User</code> - ((in static List and DataBase)).</p>
  
  <p><br /></p>
  
  <p><strong><em>So the Question is :</em></strong></p>
  
  <ul>
  <li>Is it better to store Online Users in <strong>static list</strong> and write some code when user log in to add him to that list and then keep manage this list every <code>"10s"</code> to kick out the offline users.</li>
  <li>Or the best is to load online users
  <strong>from DataBase</strong> whenever i want <code>OnlineUsers</code>.</li>
  </ul>
  
  <p><br /></p>
  
  <p><strong>note:</strong> I'm using technique from this <a href="https://stackoverflow.com/questions/542804/asp-netbest-way-to-run-scheduled-tasks">SO Question</a> to do some periodically tasks like re-manage OnlineUsers static list. </p>