Is there any way to increase maxpoolsize dynamically based on the application load.
Asked
Active
Viewed 494 times
1
-
That is hardly possible that increasing pool size may improve performance or throughput, check this video for example: https://www.youtube.com/watch?v=Oo-tBpVewP4 – Andrey B. Panfilov Dec 06 '21 at 08:04
1 Answers
2
The pool size is what's adjusting dynamically. That's what it's there for.
The max pool size is the amount of resources that you're ready to share with the application - e.g. due to available bandwidth, memory, or other. Set the max value to whatever you're ok with the application to use under expected or unexpected load. The application will use resources according to the current actual load.
So, even if you can come up with a dynamic way to adjust, it wouldn't make much sense.

Olaf Kock
- 46,930
- 8
- 59
- 90
-
I am asking to set maxpoolsize through connection pool library dynamically. like if application initially configured for maxActiveConnection 100 and if application load increases based on that want to update the maxActive Connection. – Avyaan Dec 07 '21 at 05:25
-
Well, still: What do you lose? If you're _ready to configure 200_ max, _just do so_. If you only _need 50_, the pool will close unused ones automatically, and use 50 + reserve, no matter if it's allowed to use 100 max or 200 max. That's just the semantic of "max" – Olaf Kock Dec 07 '21 at 10:20