mysql replication+keycloak 21 , no connection to replicated node

61 Views Asked by At

We have been stuck in a problem for quite a while, we have specified the following JDBC url for our master-slave cluster in production MySQL DB. We are using Agoral for connection pooling.

jdbc:mysql:replication://master:3306,slave1:3306,slave2:3306,slave2:3306/keycloak?useSSL=false&failOverReadOnly=false&serverTimezone=UTC

We are currently running 800 tps load as part of load testing.

But when i checked number of active connection threads for each mysql nodes. I can see all 6 keycloak 21 nodes are connecting with only master nodes. Slaves are idle.

Request that we send some of them are read heavy and some of them are write heavy. Initially, when our application starts it creates connections with replicated nodes but after some time it closes them.

we have specified

min connection pool to 100

inital connection pool to 100

and max connection to 300 on each of the keycloak nodes.

I am not sure if it is a bug or some configuration issue. Can anyone help in this? we are using Keycloak 21 and MySQL with master-slave replication. (

0

There are 0 best solutions below