Repository navigation
xds: support load reporting all clusters option and fix actual report interval measurement - #7209
Merged
voidzcy merged 3 commits intoJul 22, 2020
Conversation
…nterval measurement for each individual cluster:eds_service.
dapengzhang0
approved these changes
Jul 21, 2020
| private LoadStatsEntity(LoadStatsStore loadStatsStore, Stopwatch stopwatch) { | ||
| this.loadStatsStore = loadStatsStore; | ||
| this.stopwatch = stopwatch; | ||
| stopwatch.reset().start(); |
Contributor
There was a problem hiding this comment.
Better to pass a StopwatchSupplier in constructor, and create a new stopwatch here, so that it's clear that the stopwatch's lifecycle is solely managed by the LoadStatsEntity.
Contributor
Author
There was a problem hiding this comment.
Updated to take the stopwatch supplier from the LrsClient directly.
dapengzhang0
approved these changes
Jul 22, 2020
voidzcy
added a commit
to voidzcy/grpc-java
that referenced
this pull request
Aug 11, 2020
… interval measurement (grpc#7209) - Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to). - The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
voidzcy
added a commit
to voidzcy/grpc-java
that referenced
this pull request
Aug 11, 2020
… interval measurement (grpc#7209) - Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to). - The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
voidzcy
added a commit
that referenced
this pull request
Aug 11, 2020
… interval measurement (v1.31.x backport) (#7209) (#7315) - Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to). - The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
dfawley
pushed a commit
to dfawley/grpc-java
that referenced
this pull request
Jan 15, 2021
… interval measurement (grpc#7209) - Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to). - The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes for
LoadReportClientin this PR:Add support for
send_all_clustersfield in LRS response.true, just send load reports for clusters that the client is currently tracking (aka, is sending load to).The actual load report interval (in each
ClusterStatsmessage, which contains the stats for each cluster:eds_service) is tracked individually.Example:
Initially, if the client has load stats recorded for
cluster-foo:eds_service-fooandcluster-bar:eds_service-barwhile the management server is only asking for load stats forcluster-foo:eds_service-footo be reported every 10 seconds. The actual LRS requests sent to the management server should contain only oneClusterStatsmessage (forcluster-foo:eds_service-foo) with load report interval being 10 seconds. After a while, the management server asks load stats forcluster-bar:eds_service-bar. Then the first LRS request after that should containClusterStatsforcluster-bar:eds_service-barshould set its actual load report interval to the whole period from the beginning (Although the definition of "beginning" is unclear here. We use the time when the client starts to know the cluster while Envoy uses epoch. I think it shouldn't matter much for the first report of the cluster:eds_service). The point of this change is the actual load report interval for each cluster should be tracked individually as loads for clusters are not necessarily reported together.For reference, see Enovy's implementation.