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

Split out rate limiter per workqueue #953

Merged
merged 1 commit into from Feb 3, 2021

Conversation

sargun
Copy link
Contributor

@sargun sargun commented Feb 2, 2021

I would say this solves a somewhat worrying / urgent bug.

If you share a ratelimiter between workqueues, it breaks.

WQ1: Starts processing item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
--- At this point we've backed off a bit ---
WQ2: Starts processing item (with same key, When)
WQ2: Succeeds at processing item (Forget)
WQ1: Fails to process item (When) ---> THIS RESULTS IN AN ERROR

This results in an error because it "forgot" the previous
rate limit.

CC: @cwdsuzhou

If you share a ratelimiter between workqueues, it breaks.

WQ1: Starts processing item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
--- At this point we've backed off a bit ---
WQ2: Starts processing item (with same key, When)
WQ2: Succeeds at processing item (Forget)
WQ1: Fails to process item (When) ---> THIS RESULTS IN AN ERROR

This results in an error because it "forgot" the previous
rate limit.
@sargun sargun requested review from cpuguy83 and pires February 2, 2021 19:49
@cwdsuzhou
Copy link
Contributor

Thanks @sargun , looks good

@pires pires added the bug label Feb 3, 2021
Copy link
Member

@pires pires left a comment

Choose a reason for hiding this comment

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

LGTM

@sargun sargun merged commit 2ac4ff9 into virtual-kubelet:master Feb 3, 2021
@cpuguy83
Copy link
Contributor

cpuguy83 commented Feb 8, 2021

I knew this would give us some trouble. I'd rather just remove it since we are making a change like this anyway. How useful is providing a custom implementation here?

@sargun sargun deleted the break-up-ratelimiters branch February 8, 2021 19:11
@sargun
Copy link
Contributor Author

sargun commented Feb 8, 2021

@cpuguy83 How else would you configure it outside of the VK package?

giorio94 added a commit to liqotech/liqo that referenced this pull request May 12, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
giorio94 added a commit to liqotech/liqo that referenced this pull request May 12, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
giorio94 added a commit to liqotech/liqo that referenced this pull request May 13, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
giorio94 added a commit to liqotech/liqo that referenced this pull request May 17, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
giorio94 added a commit to liqotech/liqo that referenced this pull request May 24, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
adamjensenbot pushed a commit to liqotech/liqo that referenced this pull request May 24, 2021
This commit backports the modifications to the queues implemented
upstream, in order to simplify the rate-limiting configuration.
* virtual-kubelet/virtual-kubelet#937
* virtual-kubelet/virtual-kubelet#953

The custom queue implemented in virtual-kubelet/virtual-kubelet#952 is
not backported, sticking to the standard workqueue, as the reason was
mostly to get better introspection, which currently would not be
properly leveraged in liqo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants