Giter Site home page Giter Site logo

Dynamically adding a pool about pooler HOT 7 CLOSED

epgsql avatar epgsql commented on September 18, 2024
Dynamically adding a pool

from pooler.

Comments (7)

seth avatar seth commented on September 18, 2024

Hi Murali,

There is not currently a way to dynamically add a pool, but I agree it is a useful feature and there is no reason not to add it.

I'm working on a somewhat extensive set of improvements currently staged in the multi-pool and async-start branches. Adding dynamic pool creation would fit well there.

I'd love to have some details, even if only vague, on how you are using pooler. If public comments aren't a good forum for you, feel free to drop me an email seth at userprimary dot net.

from pooler.

kbmurali avatar kbmurali commented on September 18, 2024

Hi Seth,

Thanks for prompt response.

I have used your pooler for RIAK connections and it worked well when I knew the pool configuration in advance. I have a context where I would need to create a pool of ports that spawn C program at run time. The requirement is to create the pool on some user event that defines the C program to be spawned and number of port instances. The issue is that I have pooler already running for RIAK connections in that same application and hence I cannot dynamically start it any more with C port pool config. It would have been nice if I could have spawned yet another pooler gen_server instance with a different id.

One another observation is that 1 pooler managing multiple pools is okay however under volumes, there may be 'take_member' messages queuing up in the pooler mail box adding minor latencies - perhaps ability to spawn separate pooler instances may alleviate such problem as well. Just a thought.

I really appreciate you have made your implementation available via github and thank you for pretty-good implementation.

Thanks,

Murali

from pooler.

seth avatar seth commented on September 18, 2024

Thanks for the extra info. When using pooler with Riak, do you use the random load balancing in pooler?

Good observations about multiple pools. In the branch I mentioned, I have things refactored such that each pool gets its own gen_server to reduce contention under load. Makes much more sense once you start managing unrelated pools of things.

from pooler.

kbmurali avatar kbmurali commented on September 18, 2024

I am using the default load balancing strategy. Did not specify the load balancing scheme explicitly.

Do you recommend any specific scheme?

from pooler.

seth avatar seth commented on September 18, 2024

Hi there,

Wanted to let you know that I've just added the ability to dynamically add pools to the feature branch pooler-1-0. This branch has a number of other enhancements and a few changes that you will need to take into account to make use of it (see the NEWS file on that branch). I'm planning to merge this branch to master in a week or two. Any feedback is of course appreciated.

from pooler.

kbmurali avatar kbmurali commented on September 18, 2024

Thanks Seth for promptly incorporating this feature. I will play with the new build shortly and will get back to you with any further questions. Appreciate your timely action on this.

from pooler.

seth avatar seth commented on September 18, 2024

The new code is now on master, including pooler:new_pool. There are examples of its use in the tests and readme. If you run into troubles, please open a new issue. I'm going to close this one for now. Thanks again for sending suggestions.

from pooler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.