Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 19, 2026·3 min de lecture

Stolon — Cloud-Native PostgreSQL High Availability Manager

Stolon is a cloud-native PostgreSQL high-availability manager written in Go. It uses a distributed consensus store (etcd, Consul, or Kubernetes API) to coordinate automatic failover, synchronous replication, and proxy routing for PostgreSQL clusters.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Stolon Overview
Commande CLI universelle
npx tokrepo install 18fff472-5319-11f1-9bc6-00163e2b0d79

Introduction

Stolon provides automated high availability for PostgreSQL by coordinating sentinels, keepers, and proxies through a distributed store. It handles leader election, automatic failover, and streaming replication so PostgreSQL clusters can survive node failures without manual intervention.

What Stolon Does

  • Manages PostgreSQL high availability with automatic leader election and failover
  • Coordinates cluster state through etcd, Consul, or the Kubernetes API
  • Routes client connections to the current primary through a smart proxy component
  • Configures and maintains streaming replication between primary and standbys
  • Supports synchronous replication for zero-data-loss failover scenarios

Architecture Overview

Stolon has three components: the Sentinel monitors cluster health and decides failover actions, the Keeper manages the local PostgreSQL instance (starting, stopping, promoting, and configuring replication), and the Proxy routes client connections to the current primary. All components coordinate through a distributed key-value store, making the system resilient to network partitions and component failures.

Self-Hosting & Configuration

  • Deploy etcd, Consul, or use the Kubernetes API as the cluster store backend
  • Run at least two Sentinels for high availability of the management layer
  • Run one Keeper per PostgreSQL instance, each with its own data directory
  • Deploy Proxies on application nodes or as a service for connection routing
  • Use stolonctl to initialize the cluster and manage configuration changes

Key Features

  • Automatic failover with configurable timeout and fencing policies
  • Supports both asynchronous and synchronous streaming replication
  • Kubernetes-native deployment with Helm charts and StatefulSet patterns
  • Point-in-time recovery integration with backup tools like WAL-G and Barman
  • Declarative cluster specification managed through stolonctl update

Comparison with Similar Tools

  • Patroni — Similar HA manager with more community adoption; Stolon offers a separate proxy component for connection routing
  • CloudNativePG — Kubernetes-native operator approach; Stolon works on bare metal and VMs as well
  • pgBouncer + repmgr — Manual HA setup requiring more operational glue; Stolon automates the full stack
  • Crunchy PGO — Commercial Kubernetes operator; Stolon is fully open source under Apache 2.0
  • pg_auto_failover — Simpler architecture with a monitor node; Stolon uses distributed consensus for stronger fault tolerance

FAQ

Q: Can Stolon run outside of Kubernetes? A: Yes. Stolon supports etcd and Consul as store backends for bare-metal and VM deployments.

Q: How fast is automatic failover? A: Failover typically completes within seconds, depending on the configured health check interval and timeout.

Q: Does Stolon support read replicas for load balancing? A: The proxy routes to the primary only. Read replicas can be accessed directly for read-only workloads.

Q: Is Stolon still actively maintained? A: The project receives updates periodically and has a stable feature set suitable for production use.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires