-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Cluster: cluster coworkers update of raw api #1887
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1887 +/- ##
===========================================
- Coverage 55.84% 55.77% -0.08%
===========================================
Files 121 121
Lines 50701 50769 +68
===========================================
- Hits 28315 28314 -1
- Misses 22386 22455 +69
Continue to review full report at Codecov.
|
K8S Deployment File
|
Thank you very much for submitting this PR and providing a solution to the problem. 👍 By using the service to discover the origin server and updating the configuration of each origin server through the HTTP RAW API, new instances of the origin server can be discovered. This is a very direct approach and does not rely on other services, which is great. The essence of this problem is that when the origin server cluster is scaled, it cannot automatically discover new instances of the origin server because the configuration file of the origin server has fixed IP or domain names. The most direct solution is to dynamically modify the configuration file. The problem with this solution lies in the HTTP RAW API, which is very unstable because it requires modifying the configuration and then reloading it. Especially in K8S, configuration files are usually configured and mounted to pods through configMap, and modifying the configMap will automatically trigger a reload. The RAW API solution is actually conflicting with the reload configuration solution. RAW requires the configuration to be writable, while configMap is read-only (or it is best not to be written by the program to avoid synchronization issues with multiple writes). The best way to scale the origin server cluster is to configure coworkers not with their individual IP addresses, but with the address of a service that manages the origin servers. Please refer to OCM: #1607 (comment).
|
Implementing automatic discovery of coworkers in the origin cluster in the K8S environment.
Principle:
TRANS_BY_GPT3