Request too much, a redis is not busy----->redis master-slave replication, Sentinel, Redis cluster cluster ... Redis itself has a small amount of data, and multiple redis have full data, no problem. What about the database?
The amount of data in a table is too large to be a table. The amount of data in a database is too large for the library. How do you divide the data into each table, each library, and get it from there? There has to be a strategy or an algorithm (hash remainder).
Further thinking, when can you decide which database to put the data into, which table? After the SQL statement is formed.
It is estimated to intercept the storage and fetch of the data (not to intercept how the control is achieved), so SHARDING_JDBC obtained the Datasorce and transformed him.
So jdbc_sharding is how to operate, we should be clear!!!
Here is a demo of the small program:
Mybatis+jdbc_sharding+ Universal Mapper Sub-table sub-Library Demo:https://github.com/prettypanda/jdbc_sharding_mybatis
Hibernate+jdbc_sharding Sub-table sub-Library Demo:https://github.com/prettypanda/sharding_jdbc_hibernate
Extracurricular reading:
Springcloud Easy Getting Started: 70148833
Shrding_jdbc Sub-table sub-Library