Skip to content

podManagementPolicy should be OrderedReady for safer cluster recovery #5

@dimoschi

Description

@dimoschi

Problem

The StatefulSet uses podManagementPolicy: Parallel, which starts and stops all pods simultaneously during scaling operations. For a Raft-based cluster like Typesense, this is dangerous: if multiple pods go down at the same time (e.g. during a scale-down or a correlated failure), quorum is lost.

OrderedReady ensures pods are started and stopped one at a time, preserving quorum throughout scaling and recovery operations.

Proposed Change

Change the default to OrderedReady, or expose it as a configurable value:

# values.yaml
podManagementPolicy: OrderedReady
# statefulset.yaml
podManagementPolicy: {{ .Values.podManagementPolicy | default "OrderedReady" }}

Note

updateStrategy.rollingUpdate.maxUnavailable only governs Helm-triggered rollouts. It does not prevent multiple pods from being restarted simultaneously when liveness probes fail or during scaling. podManagementPolicy: OrderedReady is the correct mechanism to enforce ordered restarts at the StatefulSet level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions