Add default cluster flow control implementation#294
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #294 +/- ##
============================================
- Coverage 45.78% 38.23% -7.56%
- Complexity 921 930 +9
============================================
Files 181 219 +38
Lines 5753 6921 +1168
Branches 832 939 +107
============================================
+ Hits 2634 2646 +12
- Misses 2787 3941 +1154
- Partials 332 334 +2
Continue to review full report at Codecov.
|
- Add a universal `TokenService` SPI interface for both local flow control and distributed flow control - Add TokenResult entity to represents result of acquiring token - Add `ClusterTokenClient` as the SPI interface for client of Sentinel cluster flow control Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add new field `clusterMode` and `clusterConfig` for cluster mode - Add a `ClusterFlowConfig` class for specific items for cluster flow control - Update FlowRuleChecker to support cluster mode - Extract valid rule checking and rule map generating logic to FlowRuleUtil Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…util class - Update ParamFlowRule to support cluster mode - Add `ParamFlowClusterConfig` to provide cluster mode items for the rule - Update ParamFlowChecker to support cluster flow mode - Extract ParamFlowRuleUtil class - Change type of `flowId` from Integer to Long Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add a `ClusterTransportClient` for transport abstraction of Sentinel cluster - Add universal request/response interface and common ClusterRequest/ClusterResponse abstraction - Add common request/response data entity - Add basic abstraction of codec (EntityWriter and EntityDecoder) Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add Netty transport client implementation and default cluster token client - Add config manager for cluster client - Add codec SPI mechanism for client entity decoder / writer Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add `start` and `stop` method for automatic control - Update TokenClientProvider using SpiLoader Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add a EmbeddedClusterTokenServer interface Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Remove "borrow-from-ref" mode - Improve flow checker to support both embedded server mode and client mode Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add a `@RequestType` annotation for common use (e.g. request handler, encoder or decoder) - Add a registry for universal config supplier (e.g. namespace of client) Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add exception item extracting method in ParamFlowRule Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Initial work Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add several command handlers - Update cluster state manager Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…cluster module Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
d112ed1 to
f01fe2b
Compare
Arlmls
pushed a commit
to Arlmls/Sentinel
that referenced
this pull request
Jan 8, 2019
- Add default cluster flow control implementation
CST11021
pushed a commit
to CST11021/Sentinel
that referenced
this pull request
Nov 3, 2021
…sg when… (alibaba#294) * Fix issue : duplicate compress message body if retry to send msg when exception occurs in async sending.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe what this PR does / why we need it
Add default cluster flow control implementation.
Does this pull request fix one issue?
Closes #293
Also related to #207
Describe how you did it
// TBD: detailed design and description notes
Architecture overview (transport):
Describe how to verify it
See test cases and demo.
Special notes for reviews
This is a very large PR containing features of multiple modules. It's NOT a good idea to submit such a large PR, but it's hard to separate this into small branches.