Skip to content

SYSTEM Cited by 1 source

Patroni

What it is

Patroni is a Python-based high-availability template for PostgreSQL originally developed at Zalando and now broadly adopted across the Postgres ecosystem. It solves the classic "which replica gets promoted after a primary failure?" problem by externalising leader-election state to a distributed consensus store (etcd, Consul, ZooKeeper, or the Kubernetes API) and running a Patroni daemon alongside every Postgres node that reads that state, acts on it, and renews its own leader-lease lock.

Canonical components: - Patroni daemon — one per Postgres node; manages the Postgres process, reads DCS state, promotes / demotes as needed, writes its current role back to the DCS. - DCS (Distributed Configuration Store) — etcd / Consul / ZooKeeper / Kubernetes API; holds cluster-level state and the leader-lock primitive. - Per-cluster configuration — replication topology, timing parameters, callback hooks.

Why it shows up on this wiki

Patroni is the load-bearing HA substrate for Zalando's entire Postgres fleet and underlies both Spilo (the Patroni+Postgres Docker image) and Postgres Operator. Its "replication slots survive failover" discipline is the architectural precondition for treating the Postgres replication slot as authoritative over the Debezium offset store — without Patroni-class slot- survives-failover behaviour, Zalando's MemoryOffsetBackingStore posture would lose position on every primary failover.

Zalando's 2025-12 Debezium-contributions post canonicalises the chain verbatim:

"At Zalando, we've been running PostgreSQL at scale using Patroni (our open source solution) for automatic failover since the mid-2010s, and later built the Postgres Operator to manage PostgreSQL on Kubernetes. From day one of our logical replication rollout in late 2018, we implemented replication slot management that ensured slots survived failovers, so we could confidently trust the slot position as durable and correct." (Source: sources/2025-12-18-zalando-contributing-to-debezium-fixing-logical-replication-at-scale)

Adoption

Stub page — Patroni is widely used well beyond Zalando (Spotify, Stack Overflow, many regulated-industry Postgres shops, Crunchy Data's Postgres-on-K8s). The post doesn't enumerate the ecosystem; this page is a minimal anchor for wiki cross-references.

Seen in

  • sources/2025-12-18-zalando-contributing-to-debezium-fixing-logical-replication-at-scalecanonical wiki introduction. Zalando canonicalises Patroni as the load-bearing HA substrate enabling slot-survives-failover discipline, which in turn enables the slot-authoritative Debezium posture described in the post. Patroni plus the operational discipline Zalando built on top of it since late 2018 is what makes Zalando's MemoryOffsetBackingStore + lsn.flush.mode=connector_and_driver deployment shape structurally safe.
Last updated · 428 distilled / 1,221 read