Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow control adaptation #1161

Merged
merged 1 commit into from
Jul 3, 2023
Merged

flow control adaptation #1161

merged 1 commit into from
Jul 3, 2023

Conversation

sjmshsh
Copy link

@sjmshsh sjmshsh commented Jun 20, 2023

Traffic control adaptation k8s

Provide functionality

By reading the dubbo source code, it is found that there are two main functions to be provided to better complete the adaptation

  • Watch monitoring mechanism

  • GetRule to get full configuration at one time

  • A client is implemented. The Java version of the client only needs to be reproduced against this client. The push has high performance requirements, so grpc connection multiplexing is encapsulated on the client side.

    Both functions are implemented in this PR

Performance

The push process uses grpc bidirectional stream + connection multiplexing, similar to etcd, with very high performance.

design concept

The configuration is not stored and pushed directly in the memory. GetRule also temporarily stores the configuration in memory without persistent storage.

design

Refer to the design method of etcd related functions

Possible problems

  • If one pod of dubbo is added, where does the traffic rule come from? You can get the full amount of rules with GetRule first, and then use Watch to monitor, so it doesn’t matter if you add pods.
  • lALPM4c6Gekm6gbNAdvNA-M_995_475.png
  • In order to solve this pain point, combined with special business needs, the leaderElect mechanism of the operator is not used, so that each instance will simultaneously monitor the changes of cr resources and perform corresponding processing at the same time, thus ensuring idempotency. At the same time, the consistency of saving the configuration to memory is also guaranteed

@sonarcloud
Copy link

sonarcloud bot commented Jun 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@chickenlj chickenlj changed the base branch from refactor-with-go to refactor-with-go-components July 3, 2023 03:17
@chickenlj chickenlj merged commit e7ebc67 into apache:refactor-with-go-components Jul 3, 2023
4 of 6 checks passed
chickenlj pushed a commit that referenced this pull request Jul 18, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants