Search code examples
scalaplayframework-2.0master-slavesquerylhikaricp

Squeryl - HikariCP - mySql - Distributing Read Traffic to Slaves


I'm trying to follow the steps listed at http://dev.mysql.com/doc/connector-j/en/connector-j-master-slave-replication-connection.html which states

To enable this functionality, use the com.mysql.jdbc.ReplicationDriver class when configuring your application server's connection pool

From https://github.com/brettwooldridge/HikariCP - it says

HikariCP will attempt to resolve a driver through the DriverManager based solely on the jdbcUrl

So is this configuration all thats needed?

db.default.url=jdbc:mysql:replication ...

Squeryl has has a number of db Adapters; but my understanding is these are unrelated? http://squeryl.org/api/index.html#org.squeryl.adapters.MySQLInnoDBAdapter

Sorry for the key word loading - I'm just not too sure where I need to focus

Thanks Brent


Solution

  • And I find myself back here - please note, hikari doesn't support the Replication driver.

    https://github.com/brettwooldridge/HikariCP/issues/625#issuecomment-251613688

    MySQL Replication Driver simply does NOT work together with HikariCP.

    And

    https://groups.google.com/forum/#!msg/hikari-cp/KtKgzR8COrE/higEHoPkAwAJ

    ... nobody running anything resembling a mission critical application takes MySQL's driver-level replication support seriously.