-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: add cross-zone snapshot byte metrics to StoreMetrics
Previously, we [added](#104111) cross-region snapshot byte metrics to track the aggregate of snapshot bytes sent from and received at a store across different regions. We should add metrics to track cross-zone snapshots as well. To improve this issue, this commit adds two new store metrics - ``` range.snapshots.cross-zone.sent-bytes range.snapshots.cross-zone.rcvd-bytes ``` These metrics track the aggregate of snapshot bytes sent from and received at a store across different zones within the same region if the zone and region tier keys are properly configured across nodes. To ensure accurate metrics and consistent error logging, it is important to follow the assumption when configuring locality tiers across nodes: 1. For cross-region metrics, region tier keys must be present. 2. For cross-zone metrics, zone tier keys must be present. It is also essential to maintain consistency in the zone tier key across nodes. (e.g. using different keys, such as “az” and “zone”, can lead to unexpected behavior). 3. Within a node locality, region and zone tier keys should be unique. 4. Ensure consistent configuration of region and zone tiers across nodes. If all nodes configure both region and zone tiers: Cross-region and cross-zone metrics can be used to track following information: a. Aggregate of cross-region, cross-zone activities: `range.snapshots.cross-region.(sent|received)-bytes` b. Aggregate of same-region, cross-zone activities: `range.snapshots.cross-zone.(sent|received)-bytes` c. Aggregate of same-region, same-zone activities: `range.snapshots.(sent|received)-bytes` - a - b d. Cross-region, same zone activities will be considered as misconfigured, and an error will be logged. If all nodes have zone tiers configured, but not regions: cross-zone metrics will still be accurate. Problems arise if some nodes have region tier keys configured while others do not. If all nodes have region tiers configured: cross-region metrics will be accurate regardless of the nodes’ zone tier setup. Part of: #103983 Release note (ops change): Two new store metrics - `range.snapshots.cross-zone.sent-bytes` and `range.snapshots.cross-zone.rcvd-bytes` - are now added to track the aggregate of snapshot bytes sent from and received at a store across different zones. For accurate metrics, follow these assumptions: - Configure region and zone tier keys consistently across nodes. - Within a node locality, ensure unique region and zone tier keys. - Maintain consistent configuration of region and zone tiers across nodes.
- Loading branch information
Showing
7 changed files
with
350 additions
and
92 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
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
Oops, something went wrong.