What is the correct way to "pool" the Phoenix Query Server connections
<p>We are using Azure and Phoenix to write into an HBase cluster.  There are two drivers:  one big one and a thin client.  The thin client uses Json over HTTP to interact with the database.</p>

<p>When we create a new connection each save we can save at around 150ms per save.</p>

<pre><code>this.conn = DriverManager.getConnection("jdbc:phoenix:thin:url=http://1.1.1.1");
</code></pre>

<p>When we reuse the connection we can do it in 70ms per save:  a significant speedup.  The documentation is a bit vague and shifts between the thick and think client.</p>

<p>So what is the best practice for pooling the connections of the thin client?</p>

<p><strong>Important Change!</strong></p>

<p>We started having some trouble with connections so I want back to our code and made some changes.  I set some timers and found the above code works in 0ms.  I am not sure what I was doing wrong above.</p>

<p>So the correct way to pool Phoenix is to NOT pool Phoenix.  There are several posts that confirm this from the dev team.</p>

<p>Having a huge SQL Oracle/DB2/SqlServer background is probably my undoing.  Using Redis or Phoenix or probably any of the new No-sql databases is very different from SQL.  My suggestion is "read the directions" of the product you are using and do what they tell you to do!</p>