-
Notifications
You must be signed in to change notification settings - Fork 187
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
Always reset agent connection backoff and enter fast sync when client count < server count #632
Always reset agent connection backoff and enter fast sync when client count < server count #632
Conversation
Hi @carreter. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@avrittrohwer for visibility |
/ok-to-test |
LGTM. See latest suggestion, happy to approve when you're ready. |
@jkh52 Should be ready now! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carreter, jkh52 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
… count < server count (kubernetes-sigs#632) * Always reset backoff and enter fast sync when clien count < server count * Only call ClientsCount() once * Review comment
Part of #358 (see #358 (comment)).
Current behavior
Currently, if an agent receives an increased server count from a server it is already connected to, it doesn't reset the backoff and just uses the last set duration. This could result in an agent taking a long time to connect to new proxy servers if it receives the updated server count from a server it is already connected to.
This cannot currently happen as there is no way to update the server count on a proxy server without restarting it and dropping the connection, but this will be an issue once #273 is implemented.
Testing the fix
Using #631, I set up https://github.com/carreter/apiserver-network-proxy/tree/backoff-reset-fix-test-example . Run the following in the repo root to set up a cluster with 1 proxy server on a KCP node and 1 proxy agent on a worker node:
Then, apply
server-count-file.yaml
with the following to upload a file with an updated server count:Give it a couple seconds and you should see logs showing that the client is issuing new connection requests every 5 secs (i.e.
--sync-interval
) instead of every 30 secs (i.e.--sync-interval-cap
) like it would without this fix!