The performance of Sharding-JDBC,Sharding-Proxy and MySQL would be compared here. INSERT & UPDATE & DELETE which regarded as a set of associated operation and SELECT which focus on sharding optimization are used to evaluate performance for the basic scenarios (single route, master slave & encrypt & sharding, full route). While another set of associated operation, INSERT & SELECT & DELETE, is used to evaluate performance for master slave.
To achieve the result better, these tests are performed based on a certain amount of data with 20 concurrent threads for 30 minutes.
To achieve the result better, these tests are performed with jmeter which based on a certain amount of data with 20 concurrent threads for 30 minutes, and one MySQL has been deployed on one machine.
## Test Scenarios
#### Single Route
On the basis of one thousand data volume, four databases that each contains 1024 tables with `id` used for database sharding and `k` used for table sharding are designed for this scenario.
On the basis of one thousand data volume, four databases that are deployed on the same machine and each contains 1024 tables with `id` used for database sharding and `k` used for table sharding are designed for this scenario.
Single route select sql statement is chosen here.
#### Master Slave
One master database and one slave database is designed for this scenario based on ten thousand data volume.
One master database and one slave database, which are deployed on different machines, are designed for this scenario based on ten thousand data volume.
#### Master Slave & Encrypt & Sharding
On the basis of one thousand data volume, four databases that each contains 1024 tables with `id` used for database sharding, `k` used for table sharding, `c` encrypted with aes and `pad` encrypted with md5 are designed for this scenario.
On the basis of one thousand data volume, four databases that are deployed on different machines and each contains 1024 tables with `id` used for database sharding, `k` used for table sharding, `c` encrypted with aes and `pad` encrypted with md5 are designed for this scenario.
Single route select sql statement is chosen here.
#### Full Route
On the basis of one thousand data volume, four databases that each contains one table are designed for this scenario, field `id` is used for database sharding and `k` is used for table sharding.
On the basis of one thousand data volume, four databases that are deployed on different machines and each contains one table are designed for this scenario, field `id` is used for database sharding and `k` is used for table sharding.