You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@gmail.com> on 2021/11/14 19:29:40 UTC
[pool] BalancedKeyedObjectPool
Recently I had a the following need, which I have seen on the user list
a few times over the years.
I have a list of resource provider instances that I want to maintain
pools of connections to and I want to load balance connection requests
across the pools. I can back this using GKOP, but load balancing has to
be done on the client side. What would be nice would be to have a KOP
that supports borrowing with no key argument and configurable load
balancing strategy (e.g. round-robin, least-loaded, random).
Does this seem like a good addition to [pool]? Anyone else want to work
on it?
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [pool] BalancedKeyedObjectPool
Posted by Phil Steitz <ph...@gmail.com>.
On 11/16/21 6:30 AM, Gary Gregory wrote:
> Hi Phil.
>
> Sounds interesting.
>
> Would the new API KOP.borrowObject() throw if not configured with a
> load balancing policy or would there be a default policy?
I was thinking round-robin would be the default. If there are no keyed
pools, I would expect to throw NSEE.
Phil
>
> Gary
>
> On Sun, Nov 14, 2021 at 2:29 PM Phil Steitz <ph...@gmail.com> wrote:
>> Recently I had a the following need, which I have seen on the user list
>> a few times over the years.
>>
>> I have a list of resource provider instances that I want to maintain
>> pools of connections to and I want to load balance connection requests
>> across the pools. I can back this using GKOP, but load balancing has to
>> be done on the client side. What would be nice would be to have a KOP
>> that supports borrowing with no key argument and configurable load
>> balancing strategy (e.g. round-robin, least-loaded, random).
>>
>> Does this seem like a good addition to [pool]? Anyone else want to work
>> on it?
>>
>> Phil
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [pool] BalancedKeyedObjectPool
Posted by Gary Gregory <ga...@gmail.com>.
Hi Phil.
Sounds interesting.
Would the new API KOP.borrowObject() throw if not configured with a
load balancing policy or would there be a default policy?
Gary
On Sun, Nov 14, 2021 at 2:29 PM Phil Steitz <ph...@gmail.com> wrote:
>
> Recently I had a the following need, which I have seen on the user list
> a few times over the years.
>
> I have a list of resource provider instances that I want to maintain
> pools of connections to and I want to load balance connection requests
> across the pools. I can back this using GKOP, but load balancing has to
> be done on the client side. What would be nice would be to have a KOP
> that supports borrowing with no key argument and configurable load
> balancing strategy (e.g. round-robin, least-loaded, random).
>
> Does this seem like a good addition to [pool]? Anyone else want to work
> on it?
>
> Phil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org