FlexyPool

Connection pool monitoring

The FlexyPool library adds metrics and flexible strategies to a given Connection Pool, allowing it to resize on demand. This is very handy since most connection pools offer a limited set of dynamic configuration strategies.

Features

Tutorials

  1. The anatomy of Connection Pooling
  2. FlexyPool, reactive connection pooling
  3. Professional connection pool sizing
  4. The simple scalability equation
  5. How to monitor a Java EE DataSource
  6. How does FlexyPool support the Dropwizard Metrics package renaming
  7. How does FlexyPool support both Connection proxies and decorators

Subscribe to our Newsletter

* indicates required
10 000 readers have found this blog worth following!

If you subscribe to my newsletter, you'll get:
  • A free sample of my Video Course about running Integration tests at warp-speed using Docker and tmpfs
  • 3 chapters from my book, High-Performance Java Persistence, 
  • a 10% discount coupon for my book. 
Get the most out of your persistence layer!

Advertisements

3 thoughts on “FlexyPool

  1. Makes sense. Logging all query executions can let you know how much time is spent by executing statements. But you should also take into consideration the fetching phase as well. You could add a timer in your data access logic to measure the duration of the whole data execution.

  2. But, the connection acquisition is not correlated to the SQL query that comes afterwards. These are two separate mechanisms. You could print the query execution time with datasource-proxy or p6spy, and aggregate all data using ElasticSearch and view it in Kibana. You might want to print the threadId, to make sure that all logs get correlated by thread and time.

  3. You can always use the generic DataSource connection pool that was designed for Java EE. It should work with any DataSource implementation and it will collect all metrics for you. You won;t be able to adjust the pool size using overflow buffer, that being the only limitation.

    If you want to develop a new adaptor, it’s fairly simple. You just have to add a new Maven module, set the Maven dependency and then provide the Adaptor implementation which can set the max pool size and translate the connection acquisition request timeout exception. You can take any other adaptor module as an example, it’s really straight forward.

Leave a Reply

Your email address will not be published. Required fields are marked *