Please head to the releases page to download 5.0.0 release of Apache ShardingSphere.
The conf directory contains the template configuration files by default config-shadow.yaml and server.yaml.
If the template configuration files by default meet your business needs, replace the corresponding configuration file.
Please refer to ShardingSphere-Proxy Configuration Manual, if you want to learn more.
If the backend database is PostgreSQL, there's no need for additional dependencies.
If the backend database is MySQL, please download mysql-connector-java-5.1.47.jar or mysql-connector-java-8.0.11.jar and put it into %SHARDINGSPHERE_PROXY_HOME%/lib directory.
sh %SHARDINGSPHERE_PROXY_HOME%/bin/start.shDefault port is 3307.
Please refer to ShardingSphere-Proxy Start Server, if you want learn more.
Take the INSERT statement as an example.
INSERT INTO table (column,…) VALUES (value,…);will be executed to the production DB.
INSERT INTO table (column,…) VALUES (value,…)/*cyborg-flow:true*/;will be executed to the shadow DB.
Please refer to ShardingSphere-shadow, if you want to learn more.
SQL support,please refer to ShardingSphere-shadow use-norms