StatefulSet vs Deployment #1899
Replies: 4 comments 1 reply
-
|
CC @M0NsTeRRR |
Beta Was this translation helpful? Give feedback.
-
|
Hello @sbogomolov, Jellyseerr is not designed to support more than one replica and the default configuration with |
Beta Was this translation helpful? Give feedback.
-
|
Hey @M0NsTeRRR, This is a good point. However it works only when deployment is updated. In case pod gets shutdown - ReplicaSet will start another pod while first one is still terminating, so there will be a moment when both pods are alive. There are also more exotic scenarios, for example if node with the running pod is lost - a new pod will be started (to guarantee “at least 1”). That lost node may actually be still running the pod. When it comes back - we’ll have two pods running at the same time. These scenarios are not likely of course, but switching to StatefulSet is also free and does not seem to have obvious downsides. |
Beta Was this translation helpful? Give feedback.
-
I agree to switch if they are benefits otherwise it's a change for a change 😄
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy Thank you for your feedback ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently helm charts create a
Deployment.Deploymentis great for stateless applications, it guarantees "at least N pods" semantics.StatefulSetguarantees "at most N pods". In our case we have state: there are shared DB and volume (with config, logs, cache, ...). Is Jellyseerr designed with this shared state in mind? If not, I suggest we switch to usingStatefulSet(I'm happy to do the work btw). WithDeployment, even withReplicaCountset to1we might end-up in a situation when one pod is not yet dead and another one is already started.Beta Was this translation helpful? Give feedback.
All reactions