Stateless Processes & Backing Services

Source: content/manual/02-12factor/chapters/04-stateless-processes-backing-services.md

Purpose and scope

Keep processes stateless; treat dependencies as replaceable with clear contracts.

Outcomes

  • Predictable autoscaling and failover.
  • Clear failure modes and timeouts.
  • Simpler deployments across environments.

Signals of trouble

  • Sticky sessions and local disk reliance.
  • Coupled retries causing storms.
  • Unknown dependency SLAs.

Remediation steps

  1. Add graceful shutdown and idempotency; drain queues on termination.
  2. Document dependency contracts and timeouts; implement backoff.
  3. Chaos test critical paths and document runbooks.

Checklists and assets

References

  • Resilience patterns; platform readiness probes.