title: Cassandra Session Lifetime
body: <p>I am currently learning the basics of the Cassandra. I am using the Datastax java-driver to experiment with. Now I am currently working out the session structure. </p>
  
  <p>What I am wondering about is how to handle session lifetime. On the following Datastax page I found information about this.</p>
  
  <p><a href="http://www.datastax.com/dev/blog/4-simple-rules-when-using-the-datastax-drivers-for-cassandra" rel="nofollow">http://www.datastax.com/dev/blog/4-simple-rules-when-using-the-datastax-drivers-for-cassandra</a></p>
  
  <p>Now the following sentence creates my question.</p>
  
  <blockquote>
    <p>"Basically you will want to share the same cluster and session
    instances across your application."</p>
  </blockquote>
  
  <p>What if I would try to build a REST-webservice which uses Cassandra. What would be considered the 'application' in this instance. Would I have to maintain the session in some sort of instance class while te webservice is running? Or should I create a session on a per-user basis (meaning that in theory multiple sessions could exist at the same time)? </p>