-
Notifications
You must be signed in to change notification settings - Fork 219
Cooldown-based eager marshaling #278
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
Cooldown-based eager marshaling #278
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jiahuif The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @jpbetz @apelisse @DangerOnTheRanger |
I haven't read the code yet but thank you for the great explanation of the pull-request. I don't know if this is something we want for OpenAPI v2 since eventually we have to keep the feature enabled but we're hoping to decrease the number of users to 0, which means that the cache would NEVER have to be populated (that's the target goal). Now, we could do what you suggest for OpenAPI v3, but since it's split across group, we also don't know how often the groups are pulled vs refreshed. Do we have any specific data or reason to implement this? |
This seems like a good idea (trying to proactively warm the cache so that the 1st request after an update is less likely to be high latency). I don't know exactly what the ideal cooldown time should be. |
@jiahuif: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
With #251, the marshaling of our OpenAPI spec is delayed until the first request, so that the spec is not re-marshaled every time a new CRD is added, which saves a lot of marshaling time. However, I've encountered the following frustration with our current implementation.
This PR addresses the issues by adding a cooldown. If the spec is not updated within the cooldown, build the cache by marshaling the spec before the first request comes. This way, we can avoid having to frequently re-marshal the spec while keeping first requests fast.