forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvclient: add cross-region byte count metrics to DistSender
Previously, there were no metrics to observe cross-region traffic in batch requests / responses. This limitation becomes problematic when trying to evaluate cross-region traffic managed by nodes. To improve this issue, this commit adds two new metrics to DistSenderMetrics – CrossRegionBatchRequestBytes and CrossRegionBatchResponseBytes. These metrics track the byte count for batch requests sent and responses received in cross-region batches within DistSender. DistSender resides on the gateway node that receives SQL queries, so DistSender metrics are updated when DistSender sends cross-region batches to another node. Note: These metrics require nodes’ localities to include a tier with the key “region”. If a node does not have this key but participates in cross-region batch activities, metrics will remain unchanged, and an error message will be logged. The region of each node is determined by using the locality field and the “region” tier value. Unfortunately, the “region” key is hard coded here. Ideally, we would prefer a more flexible approach to determine node locality. Part of: cockroachdb#103983 Release note (ops change): Two new metrics - CrossRegionBatchRequestBytes, CrossRegionBatchResponseBytes - are now added to DistSender metrics. Note that these metrics require nodes’ localities to include a “region” tier key. If a node lacks this key but is involved in cross-region batch activities, an error message will be logged.
- Loading branch information
Showing
3 changed files
with
247 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters