Boteval / boteval

a library to support automated, repeatable and traceable bot evaluations
Eclipse Public License 1.0
1 stars 2 forks source link

Hikari CP #1

Open matanox opened 7 years ago

matanox commented 7 years ago

From the Hikari docs:

HikariCP relies heavily on accurate high-resolution timers for both performance and reliability. It is imperative that your server is synchronized with a time-source such as an NTP server. Especially if your server is running within a virtual machine. Do not rely on hypervisor settings to "synchronize" the clock of the virtual machine. Configure time-source synchronization inside the virtual machine. If you come asking for support on an issue that turns out to be caused by lack time synchronization, you will be taunted publicly on Twitter.

The cost of VMs requiring special treatment might not be worth the scalability gains of Hikari, because we can basically queue up our log writes on our own rather than employ Hikari, a connection pooling geared for highly parallel transactional workloads; our database writing is very monotonous ― all writes can be buffered regardless of any ordering/transactional considerations. The cost of fatal crashes on virtualized hosts is just way too high.

Clojure concurrency idioms may suffice for accumulating writes into a buffer from parallel threads and such. Using a more vanilla Connection Pooling library, one which isn't sensitive to sub-second timers, may be much safer.

matanox commented 7 years ago

This should be put on hold. Most connection poolers will suffer the same, and our data too. A virtualized env is expected to provide stable clocks.