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

Should Minecraft be a StatefulSet? #84

Closed
ChipWolf opened this issue Jul 17, 2021 · 6 comments
Closed

Should Minecraft be a StatefulSet? #84

ChipWolf opened this issue Jul 17, 2021 · 6 comments

Comments

@ChipWolf
Copy link
Contributor

ChipWolf commented Jul 17, 2021

StatefulSet seems more suitable than a Deployment for this type of workload, what are your thoughts?

@itzg
Copy link
Owner

itzg commented Jul 17, 2021

I prefer using statefulsets, but changing these charts from deployments seems very disruptive for little to no functional gain.

@ChipWolf
Copy link
Contributor Author

ChipWolf commented Jul 18, 2021

The main reason I ask is: we occasionally have an issue where a pod is stuck terminating for a little longer than expected & another one comes up to replace it, subsequently failing as it can't mount to the volume and needs manual intervention to resolve.
I imagine StatefulSet wouldn't allow another pod to come up until the previous one was totally gone.

I would've thought the Recreate strategy would prevent this, but I'm guessing the 'Terminating' state is good enough for the Deployment to spawn a new pod.

@itzg
Copy link
Owner

itzg commented Jul 19, 2021

STS's rolling update strategy seems to be advertised as similar behavior to deployment's recreate strategy. Go ahead and experiment with a statefulset in your scenario and see what happens.

@itzg
Copy link
Owner

itzg commented Jul 19, 2021

@billimek it feels like a similar conversation happened on the original helm repo, so I'm not able to find it there. What's your latest thoughts on the deployment/statefulset approaches and challenges.

@billimek
Copy link
Collaborator

@billimek it feels like a similar conversation happened on the original helm repo, so I'm not able to find it there. What's your latest thoughts on the deployment/statefulset approaches and challenges.

Personally speaking, I've gone full-circle on the idea that things should be statefulsets vs deployments meaning I believe that workloads like minecraft are appropriate for deployments and not statefulsets. For the minecraft-server chart, it's most likely going to require persistence and using a Recreate strategy vs Rollout should alleviate issues that @ChipWolf describe with a race condition of the new pod trying to consume the storage before the old pod terminates. I personally have not seen this issue and I run several minecraft chart instances and wonder if there is a better way to go about remediating the problem that doesn't involve using StatefulSet.

Anecdotally, it seems some folks have some issues with StatefulSet workloads being too 'sticky' to a given host and making updates challenging.

@ChipWolf
Copy link
Contributor Author

@billimek it feels like a similar conversation happened on the original helm repo, so I'm not able to find it there. What's your latest thoughts on the deployment/statefulset approaches and challenges.

Personally speaking, I've gone full-circle on the idea that things should be statefulsets vs deployments meaning I believe that workloads like minecraft are appropriate for deployments and not statefulsets. For the minecraft-server chart, it's most likely going to require persistence and using a Recreate strategy vs Rollout should alleviate issues that @ChipWolf describe with a race condition of the new pod trying to consume the storage before the old pod terminates. I personally have not seen this issue and I run several minecraft chart instances and wonder if there is a better way to go about remediating the problem that doesn't involve using StatefulSet.

Anecdotally, it seems some folks have some issues with StatefulSet workloads being too 'sticky' to a given host and making updates challenging.

I'm inclined to agree after some experimentation. I have a suspicion the main issue I'm seeing pods sticking in the terminating state is down to Longhorn being Longhorn.

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

No branches or pull requests

3 participants