I worked on a similar issue, although Spring was not involved. We developed an indication of a local MySQL instance (each developer had one in his own field), and the production system was a Master / Slave replication ring. We actually went further and co-hosted the application server with the database server, so at the application and database level there was a four-node.
Our application runs in JBoss. It was pretty simple, but there was quite a lot of clustering on the cluster server platform. At the same time, we were able to receive more than 300 requests per second, and sometimes up to 1000 requests per second (depending on application processing). The database was never a bottleneck - even at those rates, we rarely saw a connection pool above 5 connections.
In both cases (mine and yours), since the JDBC URL points to the local server, the functional difference does not exist from the point of view of the application. I had to play some interesting games with automatic increment settings so that data would not be typed; if you have only one deployment point (and therefore one access point to the MySQL instance), you do not need to worry about that.
Thus, no code is changed and configuration changes are not changed. It will just work. Under standard conditions, the fact that you support a couple of Master / Slave instances or a cluster will not make any difference, since you will most likely point to either the Master instance or the MySQL instance facing the cluster (in MySQL, the cluster is behind one or more database servers, replicating data).
What kind of load are you going to handle? In the past, MySQL was compared with> 1000 TPS, but the results usually vary depending on the main characteristics of the system (memory, processor cores, processor speed), responsiveness of your application, and parallel threads.
source share