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

Lengthening initial backoff time for EndpointSlice controller #89438

Conversation

robscott
Copy link
Member

@robscott robscott commented Mar 24, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:
The EndpointSlice controller has the potential to manage a large number of resources that are updated frequently. Without proper backoffs in place, there is potential for it to unnecessarily overload the API Server with requests. This makes two significant changes:

  • Increasing the base backoff from 5ms to 1s.
  • Making all syncs triggered by EndpointSlice changes delayed by at least 1 second to enable batching.

Special notes for your reviewer:
I've tested this with several e2e clusters with 2 failure scenarios:

  • Disabling discovery.k8s.io/v1beta1 API Group on the API Server
  • Removing ability to create EndpointSlices from EndpointSlice controller ClusterRole

In both cases the increased thresholds for exponential backoff seemed to be helpful. Additionally, the backoff value was quickly reset when these conditions were removed and successful syncs resumed.

For reference, here are the base backoffs I've seen for other controllers that have custom values (defaults are 5ms and 1000s):

Controller Min Max
Certificate 200ms 1000s
Job 10s 360s
Namespace 5ms 60s
Service 5s 300s

Does this PR introduce a user-facing change?:

EndpointSlice controller waits longer to retry failed sync.

/sig network
/priority important-soon
/cc @wojtek-t
/assign @freehan @liggitt

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 24, 2020
@k8s-ci-robot k8s-ci-robot requested a review from wojtek-t March 24, 2020 18:27
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/network Categorizes an issue or PR as relevant to SIG Network. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/apps Categorizes an issue or PR as relevant to SIG Apps. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 24, 2020
@robscott robscott force-pushed the endpointslice-controller-error-backoff branch 3 times, most recently from 84c8359 to 7ae3e16 Compare March 24, 2020 22:24
@liggitt
Copy link
Member

liggitt commented Mar 25, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, robscott

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold

pkg/controller/endpointslice/endpointslice_controller.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
The EndpointSlice controller has the potential to manage a large number of resources that are updated frequently. Without proper backoffs in place, there is potential for it to unnecessarily overload the API Server with requests. This makes two significant changes: Increasing the base backoff from 5ms to 1s and making all syncs triggered by EndpointSlice changes delayed by at least 1 second to enable batching.
@robscott robscott force-pushed the endpointslice-controller-error-backoff branch from 7ae3e16 to 94e5537 Compare March 25, 2020 18:00
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@wojtek-t
Copy link
Member

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@robscott
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit c4fd09d into kubernetes:master Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Mar 25, 2020
@robscott robscott deleted the endpointslice-controller-error-backoff branch March 11, 2021 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants