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/03/10 08:26:36 UTC
[GitHub] [shardingsphere] zjcnb opened a new issue #15967: [ New Feature ] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
zjcnb opened a new issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967
Hi community,
We plan to monitor slave data source delay time when we use `readwrite-splitting`. We can set a threshold for the delay time for every slave data source, `ShardingSphere` will automatic offline this data source when slave data source delay time exceeded threshold, it is convenient for us to better route the read traffic. And we can use `DistSQL` to show all slave data source delay time.
So, when we use` readwrite-splitting` and want to detect slave delay time. the config is :
```
rules:
- !READWRITE_SPLITTING
dataSources:
readwrite_ds:
type: Dynamic
props:
auto-aware-data-source-name: replication_delay_ds
- !DB_DISCOVERY
dataSources:
replication_delay_ds:
discoveryHeartbeatName: replication_delay_heartbeat
discoveryTypeName: replication_delay
discoveryHeartbeats:
replication_delay_heartbeat:
props:
keep-alive-cron: '0/1 * * * * ?'
discoveryTypes:
replication_delay:
type: Replication_delay
props:
write-data-source-name: write_ds
read-data-source-names: read_ds_0,read_ds_1
delay_milliseconds_threshold: 1000
```
--
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] zjcnb closed issue #15967: [New Feature] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967
--
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] zjcnb commented on issue #15967: [New Feature] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967#issuecomment-1063887992
Need to confim api and I will reopen after confirm.
--
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] strongduanmu closed issue #15967: [New Feature] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967
--
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] lanchengx edited a comment on issue #15967: [New Feature] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
Posted by GitBox <gi...@apache.org>.
lanchengx edited a comment on issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967#issuecomment-1066458258
@zjcnb @RaigorJiang
The delay time will be shown in the `SHOW READWRITE SPLITTING READ RESOURCES` syntax,
Example:
```
mysql> show readwrite_splitting read resources;
+-------------------+---------+-------------------+
| resource | status | delay_time(ms) |
+-------------------+---------+-------------------+
| read_ds_0 | enabled | 1000 |
+-------------------+---------+-------------------+
```
--
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] lanchengx commented on issue #15967: [New Feature] Detect master-slave replication delay in `shardingsphere-db-discovery-provider` module
Posted by GitBox <gi...@apache.org>.
lanchengx commented on issue #15967:
URL: https://github.com/apache/shardingsphere/issues/15967#issuecomment-1066458258
@zjcnb @RaigorJiang
The delay time will be shown in the `SHOW READWRITE SPLITTING READ RESOURCES` syntax,
Example:
```
mysql> show readwrite_splitting read resources;
+-------------------+---------+-------------------+
| resource | status | delay_times(ms) |
+-------------------+---------+-------------------+
| read_ds_0 | enabled | 1000 |
+-------------------+---------+-------------------+
```
--
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