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

Bypass batched fetching for small numbers of resources #314

Closed
KnVerey opened this issue Jul 9, 2018 · 1 comment · Fixed by #316
Closed

Bypass batched fetching for small numbers of resources #314

KnVerey opened this issue Jul 9, 2018 · 1 comment · Fixed by #316
Assignees

Comments

@KnVerey
Copy link
Contributor

KnVerey commented Jul 9, 2018

Bug report

Reported in #313. The root cause there is that the namespace being deployed to has over 4000 pods, most of which are old evicted pods. Since we are unconditionally using the batched fetching strategy, our sync cycles fetch and initialize all 4000+ pods even though in the example given only a single one was needed.

Expected behavior: Polling is instant for small resource groups.

Actual behavior: Polling can take forever for small resource groups, if the cluster contains a large number of resources of that type.

Version(s) affected: Latest.

Proposed solution

Wrap https://github.com/Shopify/kubernetes-deploy/blob/master/lib/kubernetes-deploy/sync_mediator.rb#L32-L37 in something along the lines of if resources.length < LARGE_BATCH_THRESHOLD and add/adjust tests.

cc @dwradcliffe @csfrancis (likely affects overall core deploy speed too) @Shopify/cloudx

@dturn
Copy link
Contributor

dturn commented Jul 27, 2018

The PR has been merged. It still need to be released (waiting to ship 2 or 3 more PRS) then bumped in core.

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 a pull request may close this issue.

2 participants