I previously wrote about the benefits of connection pooling and why monitoring it is of crucial importance. This post will demonstrate how FlexyPool can assist you in finding the right size for your connection pools.
Know your connection pool
The first step is to know your connection pool settings. My current application uses XA transactions, therefore we use Bitronix transaction manager, which comes with its own connection pooling solution.
Accord to the Bitronix connection pool documentation we need to use the following settings:
- minPoolSize: the initial connection pool size
- maxPoolSize: the maximum size the connection pool can grow to
- maxIdleTime: the maximum time a connection can remain idle before being destroyed
- acquisitionTimeout: the maximum time a connection request can wait before throwing a timeout. The default value of 30s is way too much for our QoS
Continue reading “Professional connection pool sizing with FlexyPool”
When I started working on enterprise projects we were using J2EE and the pooling data source was provided by the application server.
Scaling up meant buying more powerful hardware to support the increasing request demand. The vertical scaling meant that for supporting more requests, we would have to increase the connection pool size accordingly.
Our recent architectures shifted from scaling up to scaling out. So instead of having one big machine hosting all our enterprise services, we now have a distributed service network.
This has numerous advantages:
- Each JVM is tuned according to the hosted service intrinsic behaviour. Web nodes employ the concurrent low pause collector, while batch services use the throughput collector
- Deploying a batch service doesn’t affect the front services
- If one service goes down it won’t affect the rest
Continue reading “FlexyPool, reactive connection pooling”