title: Distributed server model
body: <p>Lets say I have 100 servers each running a daemon - lets call it <code>server</code> - that server is responsible for spawning a thread for each user of this particular service (lets say 1000 threads per server). Every <code>N</code> seconds each thread does <em>something</em> and gets information for that particular user (this request/response model cannot be changed). The problem I a have is sometimes a thread hangs and stops doing <em>something</em>. I need some way to know that users data is stale, and needs to be refreshed.</p>
  
  <p>The only idea I have is every <code>5N</code> seconds have the thread update a MySQL record associated with that user (a <code>last_scanned</code> column in the users table), and another process that checks that table every <code>15N</code> seconds, if the <code>last_scanned</code> column is not current, restart the thread.</p>