You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/13 03:44:16 UTC

[GitHub] [shardingsphere] strongyc opened a new issue, #20950: about Read write separation

strongyc opened a new issue, #20950:
URL: https://github.com/apache/shardingsphere/issues/20950

   ## Question
   If fragmentation key and read-write separation are configured, can the slave library be used for query? 
   **For English only**, other languages will not accept.
   ```
   spring.shardingsphere.rules.sharding.tables.user.actual-data-nodes=ds1.user_${0..3}
   spring.shardingsphere.rules.sharding.tables.user.table-strategy.standard.sharding-algorithm-name=user_inline
   spring.shardingsphere.rules.sharding.tables.user.table-strategy.standard.sharding-column=id
   #spring.shardingsphere.rules.sharding.sharding-algorithms.user_inline.type=INLINE
   spring.shardingsphere.rules.sharding.sharding-algorithms.user_inline.type=INLINE
   spring.shardingsphere.rules.sharding.sharding-algorithms.user_inline.props.algorithm-expression=user_$->{id % 4}
   spring.shardingsphere.rules.sharding.tables.user.key-generate-strategy.column=id
   spring.shardingsphere.rules.sharding.tables.user.key-generate-strategy.key-generator-name=snowflake
   spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
   
   spring.shardingsphere.rules.readwrite-splitting.data-sources.read_write_db.type=Static 
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds.static-strategy.write-data-source-name=ds1
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds.static-strategy.read-data-source-names= ds2
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds.load-balancer-name= rids
   spring.shardingsphere.rules.readwrite-splitting.load-balancers.rids.type=ROUND_ROBIN
   ````
   DS1 is still used for query
   Before asking a question, make sure you have:
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #20950: about Read write separation

Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #20950:
URL: https://github.com/apache/shardingsphere/issues/20950#issuecomment-1244987330

   @strongyc Hi, you can refer to this : https://github.com/apache/shardingsphere/blob/master/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongyc commented on issue #20950: about Read write separation

Posted by GitBox <gi...@apache.org>.
strongyc commented on issue #20950:
URL: https://github.com/apache/shardingsphere/issues/20950#issuecomment-1244891742

   How to configure read-write separation for fragmentation key?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongyc commented on issue #20950: about Read write separation

Posted by GitBox <gi...@apache.org>.
strongyc commented on issue #20950:
URL: https://github.com/apache/shardingsphere/issues/20950#issuecomment-1245050232

   > @strongyc Hi, you can refer to this : https://github.com/apache/shardingsphere/blob/master/examples/shardingsphere-jdbc-example/mixed-feature-example/sharding-readwrite-splitting-example/sharding-readwrite-splitting-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
   
   get,thinks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongyc closed issue #20950: about Read write separation

Posted by GitBox <gi...@apache.org>.
strongyc closed issue #20950: about Read write separation
URL: https://github.com/apache/shardingsphere/issues/20950


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org