You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Linyuxin <li...@huawei.com> on 2015/09/28 05:47:31 UTC
How to pooling connections in Bolts
Hi All,
I found many connections created by Bolts may cause a lot of pressure. Especially, the short connections cause the ‘logon storm’ for oracle.
So, I want to know if anyway to pooling connections in Bolts, such as for oracle, Hbase, Redis ......
I really know how to create a connection pool in a Monolithic system, such as C3P0 for oracle, Jedis pool for Redis. But it seems not appropriate for Bolts.
In my mind, there may be two ways to fix it:
1. Create a connection pool per worker. Means using a static field per jvm process.
But if the worker crash down, “connection leak” pops.
However, we can set the “connection timeout” on server side to reduce the harm. But it still is not an elegant implementation.
2. Find a proxy to be the pool. Every bolt borrows a connection from it when needs. But by now, I don’t find an appropriate component. And IPC may cause performance problems.
So, any suggestion?
________________________________
Thanks and Regards,
林钰鑫 / Derek
Re: How to pooling connections in Bolts
Posted by Kashyap Mhaisekar <ka...@gmail.com>.
We did a pool of connections at a bolt instance level. Works fine till
date...
On Sun, Sep 27, 2015 at 10:47 PM, Linyuxin <li...@huawei.com> wrote:
> Hi All,
>
> I found many connections created by Bolts may cause a lot of
> pressure. Especially, the short connections cause the ‘logon storm’ for
> oracle.
>
> So, I want to know if anyway to pooling connections in Bolts, such as for
> oracle, Hbase, Redis ......
>
>
>
> I really know how to create a connection pool in a Monolithic system, such
> as C3P0 for oracle, Jedis pool for Redis. But it seems not appropriate for
> Bolts.
>
> In my mind, there may be two ways to fix it:
>
> 1. Create a connection pool per worker. Means using a static field per
> jvm process.
>
> But if the worker crash down, “connection leak” pops.
>
> However, we can set the “connection timeout” on server side to reduce the
> harm. But it still is not an elegant implementation.
>
> 2. Find a proxy to be the pool. Every bolt borrows a connection from it
> when needs. But by now, I don’t find an appropriate component. And IPC may
> cause performance problems.
>
>
>
> So, any suggestion?
>
>
> ------------------------------
>
>
> Thanks and Regards,
>
> 林钰鑫 / Derek
>