title: Cassandra Datastax Driver - Connection Pool
body: <p>I'm trying to understand the connection pooling in Datastax Cassandra Driver, so I can better use it in my web service.</p>
  <p>I have version 1.0 of the documentation. It says:</p>
  <blockquote>
  <p>The Java driver uses connections asynchronously, so multiple requests can be submitted on the same connection at the same time.</p>
  </blockquote>
  <p>What do they understand by connection? When connecting to a cluster, we have: a Builder, a Cluster and a Session. Which one of them is the connection?</p>
  <p>For example, there is this parameter:</p>
  <blockquote>
  <p>maxSimultaneousRequestsPerConnection - number of simultaneous requests on all connections
  to a host after which more connections are created.</p>
  </blockquote>
  <p>So, these connections are automatically created, in the case of connection pooling (which is what I would expect). But what exactly are the connections? Cluster objects? Sessions?</p>
  <p>I'm trying to decide what to keep 'static' in my web service. For the moment, I decided to keep the Builder static, so for every call I create a new Cluster and a new Session. Is this ok? If the Cluster is the Connection, then it should be ok. But is it? Now, the logger says, for every call:</p>
  <blockquote>
  <p>2013:12:06 12:05:50 DEBUG Cluster:742 - Starting new cluster with contact points</p>
  <p>2013:12:06 12:05:50 DEBUG ControlConnection:216 - [Control connection] Refreshing node list and token map</p>
  <p>2013:12:06 12:05:50 DEBUG ControlConnection:219 - [Control connection] Refreshing schema</p>
  <p>2013:12:06 12:05:50 DEBUG ControlConnection:147 - [Control connection] Successfully connected to...</p>
  </blockquote>
  <p>So, it connects to the Cluster every time? It's not what I want, I want to reuse connections.</p>
  <p>So, the connection is actually the Session? If this is the case, I should keep the Cluster static, not the Builder.</p>
  <p>What method should I call, to be sure I reuse connections, whenever possible?</p>