Sharding JDBC middleware master-slave separation how to do failover to achieve high availability ah?

configured one master and two slaves, master write slave read, found that if a slave, or master, the system will not work, always trying to connect to the failed database. What about this situation?

my goal from low to high is: 1 if you hang up one slave, let the other slave work, one master and one slave, wait for the failed slave to start manually, and then restore one master and two slaves

2 if you hang up two slaves, master will do all the reading and writing

.

3 if you hang up master, two slaves will become one master and one slave

is it possible for sharding jdbc to do this?

at least you can"t fail to work because a database is down.

May.10,2021
Menu