Connection Pool with Erlang PB Client Necessary?

Bryan O'Sullivan bos at
Tue Jul 26 14:51:23 EDT 2011

On Tue, Jul 26, 2011 at 11:35 AM, Andrew Berman <rexxe98 at> wrote:

> So, then, two more questions.  I have used connection pools in Java
> like C3P0 and they can ramp up connections and then cull connections
> when there is a period of inactivity.  The only pooler I've found that
> does this is: .  Do you have any other
> recommendations on connection poolers?

Sorry, I'm not an Erlang user, so can't help with that.

> Second, I'm still a little confused on client ID.  I thought client Id
> represented an actual client, not a connection.

It's very hard to find documentation on what a client ID is for and why it
matters, so don't blame yourself :-)

> After

seeing what you wrote and reading a bit more on it, it seems like
> client Id should just be some random string (base64 encoded) that
> should be generated on creating a connection.

That's not a bad plan. It can be helpful to prefix it with a human-readable
component so you have some idea which components in your system are
participating when something goes wrong. So part fixed, part random.

Also, if you're using a connection pool, it's not a bad idea to change the
client ID each time you take a connection from the pool. The downside to
this is that it adds a TCP roundtrip, and will thus increase latency. (As a
matter of safe interface design, client IDs arguably shouldn't be
per-connection entities; it might be better if they were per-request.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list