Comments (7)
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.
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.
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.
I am using the default load balancing strategy. Did not specify the load balancing scheme explicitly.
Do you recommend any specific scheme?
from pooler.
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.
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.
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)
- Will there be a new release soon? HOT 1
- Max connection lifetime?
- metrics? HOT 1
- Unexpected :error_no_members HOT 7
- Build failure with OTP 18.1 HOT 2
- pooler:take_member returns same PID all the time HOT 10
- eredis and pooler - pair not made in heaven HOT 3
- Failed to start member
- Should add API for take_group_member/2? HOT 1
- Use docs instead of dev profile
- pooler:time_as_{millis, micro}/2 tests break with rebar3 on R15B03-1 HOT 2
- "exit with reason killed in context child_terminated" problem HOT 2
- Support: should add a map to choose a pool to start under different conditions in config HOT 1
- :error_no_group when function is called from a separate app HOT 3
- erlang/otp 20 , pooler 1.5.2, can not compile HOT 2
- ERROR REPORT when start with make run HOT 1
- Node Failure Handling, HOT 1
- add_member_retry seems to be not in use anymore
- Add prometheus-style metics API
- Unexpected "error_no_members" when load testing cowboy server HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pooler.