|
11 | 11 | <p><Ahref="https://github.com/brettwooldridge/HikariCP">HikariCP</a> is a very fast lightweight Java connection pool. The API and overall codebase is relatively small (A good thing) and highly optimized. It also does not cut corners for performance like many other Java connection pool implementations. The Wiki is highly informative and dives really deep. If you are not as interested in the deep dives you should at least read and watch the video on <ahref="https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing">connection pool sizing.</a></p> |
12 | 12 |
|
13 | 13 | <h2class="anchored">Creating Connection pools</h2> |
14 | | -<p>Let's create two connections pools one for OLTP (named transactional) queries and one for OLAP (named processing). We want them split so we can have a queue of reporting queries back up but allow critical transactional queries to still get priority (This is up to the database of course but we can help a bit). We can also easily configure different timeouts or transactioniscolation levels. For now we just just change their names and pool sizes.</p> |
| 14 | +<p>Let's create two connections pools one for OLTP (named transactional) queries and one for OLAP (named processing). We want them split so we can have a queue of reporting queries back up but allow critical transactional queries to still get priority (This is up to the database of course but we can help a bit). We can also easily configure different timeouts or transactionisolation levels. For now we just just change their names and pool sizes.</p> |
15 | 15 |
|
16 | 16 | <h3class="anchored">Configuring the Pools</h3> |
17 | 17 | <p>HikariCP offers several options for configuring the pool. Since we are fans of roll your own and already created our own <ahref="/posts/environment-aware-configuration-with-typesafe-config">Typesafe Configuration</a> we will reuse that. Notice we are using some of Typesafe's configuration inheritance.</p> |
|