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

Make throttling nmagent fetches for nodesubnet more dynamic #3023

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

santhoshmprabhu
Copy link
Contributor

Reason for Change:
We previously added fetch of secondary IPs to the NMAgent client in CNS. This PR makes the fetch asynchronous, with the ability to adjust the frequency dynamically. Specifically,

  1. Min and max interval between fetches can be configured
  2. Frequency is cut in half (interval doubled) if no diff is seen, up to the max interval.
  3. Min interval is used as soon as a diff is seen

This is implemented using a time Ticker, but we wrap it with a wrapper so as to mock it for tests. This PR also includes some additional checks for empty responses from the nmagent (this was raised in this comment). Also have UTs.

Issue Fixed:
NA

Requirements:

Notes:

@santhoshmprabhu santhoshmprabhu added cns Related to CNS. go Pull requests that update Go code labels Sep 19, 2024
@santhoshmprabhu santhoshmprabhu self-assigned this Sep 19, 2024
@santhoshmprabhu santhoshmprabhu requested a review from a team as a code owner September 19, 2024 21:28
@santhoshmprabhu santhoshmprabhu changed the title Sanprabhu/cilium node subnet intelligent refresh Make throttling nmagent fetches for nodesubnet more dynamic Sep 19, 2024
@santhoshmprabhu
Copy link
Contributor Author

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cns Related to CNS. go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant