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

feat: allow to configure livekit Deployment as StatefulSet #109

Closed

Conversation

holzgeist
Copy link

This change allows Livekit to be deployed as a StatefulSet instead of a Deployment.

Motivation

Our main setup are 3 nodes on a fixed pool. For scaling we use a different, dynamic pool and when scaling down, we of course want pods from the dynamic pool to be selected for killing. Otherwise, when scaling down the pool we will have to move a pod again. Apparently Kubernetes doesn't expose many options to select pods for scaling down, so we came up with this approach.

For a StatefulSet with scale N, Kubernetes guarantees to kill pod N-1 when scaling down. As our base nodes will always have indices 0-2, this approach will guarantee killing a pod on the dynamic pool

TBD

The current change lets the user define the deployment kind as a raw field, where really only two values are supported. One other way I can think of would be a boolean deployAsStatefulSet variable that then selects the proper value in the templates.

@holzgeist
Copy link
Author

Update: We will go with a single scaling pool after all, closing this PR

@holzgeist holzgeist closed this Oct 8, 2024
@holzgeist holzgeist deleted the feat-stateful-set-scaling branch October 8, 2024 14:03
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 this pull request may close these issues.

1 participant