phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laran Evans (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-2388) Support pooling Phoenix connections
Date Thu, 28 Feb 2019 20:09:00 GMT


Laran Evans commented on PHOENIX-2388:

I have a few questions. 
 # *How long is the underlying HBase connection kept alive?*
 ** I've read that the first call to Phoenix can be much slower than subsequent calls. This
would be fine in a batch context. But, for example, if I have one request per minute and need
to provide an SLA of 250ms response times, would each request then end up being slow (paying
the cost to establish the connection on every request)
 # *Does the way that PhoenixConnection works make it essentially able to handle only one
query at a time?*
 ** The way I read the docs, it sounds as though all PhoenixConnections inside a single JVM
share the same underlying HBase connection. So, if I have 8 cores on a machine, I could theoretically utilize
8 concurrent connections to HBase. But is this not possible with Phoenix because it only ever
has 1 connection to HBase, making it single-threaded? Assuming that my HBase is able to handle
8 concurrent queries, wouldn't having only 1 connection result in much lower throughput?
 # The performance numbers that I've seen for Phoenix all show query times. But, if my query
runs in under 10 ms and it takes 100ms to establish the connection to HBase, the total round
trip would be 110ms. This is exactly the issue that connection pooling addresses. *Does Phoenix
have some special/magical way of avoiding this?*

> Support pooling Phoenix connections
> -----------------------------------
>                 Key: PHOENIX-2388
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Priority: Major
>         Attachments: PHOENIX-2388.patch
> Frequently user are plugging Phoenix into an ecosystem that pools connections. It would
be possible to implement a pooling mechanism for Phoenix by creating a delegate Connection
that instantiates a new Phoenix connection when retrieved from the pool and then closes the
connection when returning it to the pool.

This message was sent by Atlassian JIRA

View raw message