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

feat(kds): response backoff #7997

Merged

Conversation

jakubdyszkiewicz
Copy link
Contributor

Checklist prior to review

Response backoff is a way to rate limit clients from sending data too often.
Let's say we have a Zone CP that has many constant changes to Dataplane objects. With the default 1s KUMA_MULTIZONE_ZONE_KDS_REFRESH_INTERVAL we will aggregate changes every 1s and send this to global. However, Global CP may want to slow down Zone CP from changing resources too often.

The communication looks like this
Global CP sends DeltaDiscoveryRequest
Zone CP sends DeltaDiscoveryResponse with DP list
Global CP saves DPPs and sends ACK (DeltaDiscoveryRequest)
Zone CP sends DeltaDiscoveryResponse with DP list
Global CP saves DPPs and sends ACK...

If Global CP waits to send ACK after it saves DPPs, Zone CP won't send a new list. Instead, it will aggregate changes over time.

This is a setting for all resources, NOT per resource type because we have one loop of DeltaDiscoveryResponse. We don't wait for the initial DeltaDiscoveryResponse because when Zone CP connects first, it sends a request for every resource type.

The default is set to 0 so we won't change the current behavior.

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) -- tested manually, not sure how to test it well in e2e tests.
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner October 10, 2023 10:11
@jakubdyszkiewicz jakubdyszkiewicz requested review from Automaat and bartsmykla and removed request for a team October 10, 2023 10:11
@jakubdyszkiewicz jakubdyszkiewicz merged commit 64641a0 into kumahq:master Oct 10, 2023
7 checks passed
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/response-backoff branch October 10, 2023 11:12
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