boss_db icon indicating copy to clipboard operation
boss_db copied to clipboard

Use new poolboy 'stack based' strategy

Open davidw opened this issue 11 years ago • 2 comments
trafficstars

Poolboy has long had a bit of a problem with managing resources like databases that are "expensive" to set up and hold:

https://github.com/devinus/poolboy/issues/29

https://github.com/devinus/poolboy/issues/30

They've decided to allow stack based usage of poolboy, beyond the regular round robin system:

https://github.com/devinus/poolboy/pull/50

That, combined with some fiddling on the Chicago Boss side of things, might resolve the resource problem like. CB would start off with a lot of database workers that are, however, not connected. When requested, they connect and stay connected. When idle for X seconds, they disconnect. That way, the ones at the top of the stack will be used often and stay connected, others will disconnect, releasing database workers.

davidw avatar May 12 '14 14:05 davidw

This sounds awesome, imo!

On Mon, May 12, 2014 at 9:52 AM, David N. Welton [email protected]:

Poolboy has long had a bit of a problem with managing resources like databases that are "expensive" to set up and hold:

devinus/poolboy#29 https://github.com/devinus/poolboy/issues/29

devinus/poolboy#30 https://github.com/devinus/poolboy/issues/30

They've decided to allow stack based usage of poolboy, beyond the regular round robin system:

devinus/poolboy#50 https://github.com/devinus/poolboy/pull/50

That, combined with some fiddling on the Chicago Boss side of things, might resolve the resource problem like. CB would start off with a lot of database workers that are, however, not connected. When requested, they connect and stay connected. When idle for X seconds, they disconnect. That way, the ones at the top of the stack will be used often and stay connected, others will disconnect, releasing database workers.

— Reply to this email directly or view it on GitHubhttps://github.com/ChicagoBoss/boss_db/issues/179 .

Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm

choptastic avatar May 15 '14 18:05 choptastic

I have implemented this here:

https://github.com/davidw/boss_db/tree/disconnect_on_inactive

But I'm not entirely happy with it. See the discussion here:

https://github.com/devinus/poolboy/issues/30

davidw avatar May 21 '14 15:05 davidw