shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

The best config of vertical databases

Open fantacy2001 opened this issue 6 years ago • 10 comments

What is the best config of vertical databases? more than 400 tables, only vertical databases, about ten main databases, each main database has two slave databases。 Looking forward to your reply, thanks!

fantacy2001 avatar Mar 02 '20 09:03 fantacy2001

Hi, @fantacy2001 , what's your meaning in detail of vertical databases?

kimmking avatar Mar 02 '20 18:03 kimmking

Hi, @fantacy2001 , what's your meaning in detail of vertical databases?

Do I just need to add configuration?like this: master,master_slave0,master_slave1,authority,authority_slave0,authority_slave1

master

spring.shardingsphere.sharding.tables.auto_device.actual-data-nodes=master.auto_device spring.shardingsphere.sharding.tables.band_info.actual-data-nodes=master.band_info

authority

spring.shardingsphere.sharding.tables.au_data_rule.actual-data-nodes=authority.au_data_rule spring.shardingsphere.sharding.tables.au_module.actual-data-nodes=authority.au_module

if i have too many tables in this config(about Four hundred), Does it affect performance? thank you!

fantacy2001 avatar Mar 03 '20 01:03 fantacy2001

+1

phoema avatar Mar 03 '20 09:03 phoema

You means all databases have the same structures. And wanna config them in a simple style?

kimmking avatar Mar 03 '20 11:03 kimmking

You means all databases have the same structures. And wanna config them in a simple style?

i mean 400 tables Split into different databases by business, each database has different tables. like this config ,is ok ?

spring.shardingsphere.datasource.names=master,master_slave0,master_slave1,authority,authority_slave0,authority_slave1 master库配置: spring.shardingsphere.sharding.tables.auto_device.actual-data-nodes=master.auto_device spring.shardingsphere.sharding.tables.band_info.actual-data-nodes=master.band_info authority库配置: spring.shardingsphere.sharding.tables.au_data_rule.actual-data-nodes=authority.au_data_rule spring.shardingsphere.sharding.tables.au_module.actual-data-nodes=authority.au_module

fantacy2001 avatar Mar 03 '20 12:03 fantacy2001

If you means many different tables in ten db, and how about performance. I suggest you can clone the latest master code and build it:

mvn clean install -Prelease

And try the distribution to see how long will all metadata loaded, these info will show in console logs.

kimmking avatar Mar 03 '20 16:03 kimmking

If you means many different tables in ten db, and how about performance. I suggest you can clone the latest master code and build it:

mvn clean install -Prelease

And try the distribution to see how long will all metadata loaded, these info will show in console logs. sorry, I may not have expressed it clearly. My question has two points: 1、Vertical sharding databases by business, Is it feasible to follow the configuration I mentioned above? 2、use sharding-jdbc,If there are many tables split into different databases , will there be performance problems when routing?

fantacy2001 avatar Mar 04 '20 06:03 fantacy2001

You can make an investigation for your own cases as a POC.

kimmking avatar Mar 05 '20 12:03 kimmking

May I close this issue?

terrymanu avatar Mar 20 '20 03:03 terrymanu

May I close this issue?

please close it ,thank you !

fantacy2001 avatar Mar 22 '20 09:03 fantacy2001