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

fix(scheduler): Add grace period for model unload #5965

Merged
merged 9 commits into from
Oct 8, 2024

Conversation

sakoush
Copy link
Member

@sakoush sakoush commented Oct 8, 2024

What this PR does / why we need it:

Currently when a model is scaling down (reducing the number of replicas), and while we make sure that we issue a remove route to the server containing the replica before unloading the replica, we found issues where there are still race conditions between envoy actually applying the cluster change and the model replica unloading.

This PR introduces a grace period that is applied before any unload to a particular replica to guard against this race condition. Typically envoy cluster updates take ~500ms and we set the default grace period to 2s.

The value can be changed via envar on seldon-agent SELDON_UNLOAD_GRACE_PERIOD_SECONDS.

@sakoush sakoush requested a review from lc525 as a code owner October 8, 2024 11:34
@sakoush sakoush added the v2 label Oct 8, 2024
@sakoush sakoush requested a review from driev October 8, 2024 11:34
Copy link
Member

@lc525 lc525 left a comment

Choose a reason for hiding this comment

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

lgtm

@sakoush sakoush merged commit 864ad29 into SeldonIO:v2 Oct 8, 2024
4 checks passed
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.

2 participants