Free audit

View Audit Scope
JusDBStolon v0.17.0 · Legacy Operations & Patroni / CNPG Modernization

Stolon architecture, stolonctl reference & Patroni migration hub.

Stolon (by Sorint.lab) pioneered cloud-native PostgreSQL high availability using a three-daemon Go architecture (`stolon-keeper`, `stolon-sentinel`, and `stolon-proxy`) backed by etcd or Consul. Because upstream Stolon development stopped at v0.17.0 in 2021, production teams running Stolon face two urgent needs: stabilizing existing Keeper/Sentinel clusters on PostgreSQL 12 to 15, and executing a safe migration to actively maintained Patroni or CloudNativePG. This reference hub covers both paths, backed by a 15-minute P1 initial-response target under a 24x7 support agreement.

Stolon

Keeper · Sentinel · Proxy Stack

stolon-sentinel

supported

Discovers Keepers, computes the authoritative `ClusterData` topology view inside etcd/Consul, and elects the master Keeper.

We stabilize legacy Stolon v0.17.0 deployments and execute live migrations to Patroni 4.x and CloudNativePG.

P1: 15 min · P2: 30 min
Initial-response targets under a 24x7 support agreement (P3: 60 min, P4: 90 min); 2 to 4 hours during covered business hours.
Upstream Status: v0.17.0
Stolon has had no upstream releases since May 2021 and lacks native PostgreSQL 16/17/18 GUC and replication slot changes.
Stabilize or Migrate
We support existing Stolon clusters in production and execute low-downtime cutovers to Patroni or CloudNativePG.

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

Production Failure Modes

Six Stolon issues we resolve in production.

Because upstream Stolon froze at v0.17.0 in 2021, production teams frequently run into stuck `converging` Keepers, `usePgrewind: false` defaults, and PostgreSQL 15/16/17 upgrade blockers.

  • `stolon-proxy` drops all client connections every few minutes

    proxying to master keeper ... closing connections

    etcd v3 or Consul watch streams are timing out between `stolon-proxy` and the store, or `failInterval` (default 20s) is expiring during disk I/O stalls on the master Keeper.

    Inspect `stolonctl status` and etcd `wal_fsync_duration_seconds`; increase `failInterval` to `30s` and `sleepInterval` to `5s` via `stolonctl update --patch`.

  • Standby Keeper stuck in `converging` state after an unplanned failover

    keeper Healthy: true · Role: standby (converging)

    The former master Keeper diverged in WAL timeline and `usePgrewind: true` was either disabled in the Stolon cluster spec or lacked a valid superuser password file.

    Enable `usePgrewind: true` and `pgParameters.wal_log_hints: "on"` in the Stolon cluster spec, or run `stolonctl removekeeper` and re-sync the standby.

  • PostgreSQL 15/16+ upgrade breaks `stolon-keeper` startup

    unknown configuration parameter / recovery error in keeper logs

    Stolon v0.17.0 (released in 2021) hardcodes legacy PostgreSQL recovery and replication assumptions that conflict with modern PostgreSQL major versions.

    Keep Stolon pinned to supported PostgreSQL versions while standing up a side-by-side Patroni or CloudNativePG cluster synced via streaming or logical replication.

  • All writes hang when a synchronous standby restarts

    WARNING: canceling wait for synchronous replication

    `synchronousReplication: true` is configured with `minSynchronousStandbys: 1` on a 2-Keeper cluster, leaving zero healthy standbys to acknowledge commits during a restart.

    Maintain at least 3 Keepers (`maxSynchronousStandbys: 2`, `minSynchronousStandbys: 1`) whenever `synchronousReplication: true` is active.

  • Stolon cluster trained on etcd v2 fails after an etcd 3.5+ upgrade

    store endpoint error: v2 store is deprecated/disabled

    Older Stolon deployments initialized with `--store-backend=etcdv2` break when platform teams upgrade etcd to 3.5+ where the v2 API is disabled by default.

    Migrate the Stolon store backend to `--store-backend=etcdv3` in a maintenance window or use the opportunity to cut over orchestration to Patroni.

  • Read replicas cannot be load-balanced through `stolon-proxy`

    stolon-proxy only exposes the single active master

    By design, `stolon-proxy` only routes TCP traffic to the current master Keeper and does not provide a read-replica load-balancing listener.

    Deploy HAProxy or PgBouncer + HAProxy alongside Stolon to balance read-only queries across standby Keepers.

Response Targets & Incident Triage

Published P1 to P4 response targets and the first hour of a P1.

When `stolon-proxy` severs production connections or a Keeper refuses to converge, you reach a senior PostgreSQL DBRE directly.

During covered business hours

2 to 4 hours

Initial response target

Initial-response target during covered business hours, Mon–Fri 09:00–18:00 IST (UTC+5:30).

P1 incidents (under a 24x7 support agreement)

15 minutes

Initial response target

Initial-response target for P1 incidents where your service agreement includes 24x7 on-call.

Published Severity Matrix (under a 24x7 support agreement)

P1 · Critical15 minutes

Production database down, primary unreachable, data corruption risk, or active failover event.

P2 · High30 minutes

Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.

P3 · Medium60 minutes

Non-critical slow query regression, staging issue, backup warning, or replication check alert.

P4 · Low90 minutes

Configuration question, index advisory, planned schema review, or general operational request.

Our engineering team is in India; business-hours coverage is Mon–Fri 09:00–18:00 IST (UTC+5:30), and 24x7 on-call is available under your service agreement. Every 24x7 response target above applies under a 24x7 support agreement and measures initial engineer response, not full incident resolution.

01 · Page

0 to 15 minutes (P1 target under a 24x7 support agreement)

Your alert reaches a senior PostgreSQL DBRE familiar with Stolon internals directly, with no Tier-1 ticket queue.

02 · Triage

15 to 30 minutes

We run `stolonctl status`, `stolonctl clusterdata read`, and inspect `stolon-sentinel` and `stolon-keeper` logs alongside etcd/Consul quorum health.

03 · Mitigate

30 to 60 minutes

We patch cluster spec timers (`stolonctl update --patch`), unstick converging Keepers, or force a clean master failover (`stolonctl failkeeper`) to restore `stolon-proxy` traffic.

04 · Review

Within 24 hours

We deliver a written post-incident finding with stabilized `stolonctl` cluster spec settings and a concrete roadmap to migrate off unmaintained Stolon.

Stabilization & Modernization Scope

Six ways we support and modernize Stolon environments.

We keep your current Stolon v0.17.0 cluster stable today while executing a structured migration to Patroni or CloudNativePG.

stolonctl · ClusterData · etcdv3 / Consul

Production Stolon v0.17.0 Stabilization

Keep existing mission-critical Stolon clusters healthy while your engineering team prepares for a modern orchestrator transition.

  • Tuning of `sleepInterval`, `requestTimeout`, `convergenceTimeout`, and `failInterval`.
  • Resolution of stuck `converging` Keepers and `stolon-proxy` connection drops.
Stolon -> Patroni · etcd v3 · HAProxy :8008

Stolon to Patroni Live Migration

Replace Stolon with actively maintained Patroni 4.x + HAProxy without rebuilding multi-terabyte PostgreSQL data directories.

  • Standby cascading from your existing Stolon master into a new Patroni + etcd v3 ring.
  • Sub-minute cutover with PgBouncer connection buffering and instant rollback safety.
CloudNativePG · Spilo · K8s Lease DCS

Stolon to CloudNativePG (K8s Operator)

Running Stolon in containers? Migrate to CloudNativePG (CNPG) or Zalando Spilo for native Kubernetes CRDs and PostgreSQL 16/17/18 support.

  • Bootstrap new CloudNativePG clusters directly from your Stolon primary via `pg_basebackup` or logical replication.
  • Replace `stolon-proxy` with native Kubernetes `-rw` and `-ro` Services.
PgBouncer · HAProxy · stolon-proxy

Adding PgBouncer & Read Replica Routing

Supplement `stolon-proxy` (which only routes to the master) with PgBouncer transaction pooling and HAProxy read-replica load balancing.

  • Offload read-only reporting queries to Stolon standby Keepers.
  • Multiplex thousands of app sockets onto bounded PostgreSQL `max_connections`.
etcdv3 · stolonctl init · clusterdata

etcd v2 to etcd v3 Store Upgrades

Rescue legacy Stolon deployments blocked by etcd v2 deprecation or Consul ACL policy changes.

  • Export and re-initialization of `stolonctl` cluster data on etcd v3.
  • Dedicated etcd disk latency and compaction tuning (`--auto-compaction-retention`).
Logical Replication · PG 17 · Zero-Drama Cutover

Combined Stolon Exit + PG Major Upgrade

Combine your migration off Stolon v0.17.0 with a major version upgrade from PostgreSQL 12/13/14 to PostgreSQL 17.

  • Logical replication (`CREATE PUBLICATION` / `SUBSCRIPTION`) from Stolon PG 13 to Patroni PG 17.
  • Row-hash verification and shadow read validation before cutover.

Interactive Cluster States & Reference stolonctl Spec

How Stolon behaves across steady state, Keeper flaps, and Patroni migration.

Compare a stabilized Stolon cluster, a stuck `converging` Keeper failure, and a live migration cutover to Patroni 4.x / CloudNativePG, followed by our reference `stolonctl` spec.

Stolon Keeper/Sentinel & Modernization Simulator

Application and routing

2 Sentinels watch 3 Keepers via etcd v3; `stolon-proxy` forwards writes to `keeper0` (master) and `usePgrewind: true` is active.

Active
  • stolon-proxy Fleet

    Routes TCP connections to keeper0

    Watches ClusterData in etcd v3

  • stolon-sentinel (Leader + Standby)

    Computes ClusterData & master role

    failInterval = 30s · convergence = 3m

  • keeper0 (Master) + keeper1/2 (Standbys)

    synchronousReplication = true

    usePgrewind = true · wal_log_hints = on

2 Sentinels watch 3 Keepers via etcd v3; `stolon-proxy` forwards writes to `keeper0` (master) and `usePgrewind: true` is active.

Production Configuration Specimen · Stolon v0.17.0

Hardened stolonctl Cluster Spec JSON & Operator Runbook

Before: usePgrewind=false · 20s flapsAfter: Stabilized spec + Patroni exit path

1. Reference stolonctl cluster spec JSON

stolon-cluster-spec.json

{
  "initMode": "existing",
  "sleepInterval": "5s",
  "requestTimeout": "10s",
  "convergenceTimeout": "180s",
  "failInterval": "30s",
  "deadKeeperRemovalInterval": "48h",
  "maxStandbysPerSender": 5,
  "synchronousReplication": true,
  "minSynchronousStandbys": 1,
  "maxSynchronousStandbys": 2,
  "usePgrewind": true,
  "pgParameters": {
    "wal_level": "replica",
    "wal_log_hints": "on",
    "max_wal_senders": "10",
    "max_replication_slots": "10",
    "hot_standby": "on",
    "track_commit_timestamp": "on"
  }
}

2. Operator diagnostics & spec patching (stolonctl)

stolonctl CLI Operations

# 1. Export environment variables for stolonctl store access
export STOLONCTL_CLUSTER_NAME=pg-stolon-prod
export STOLONCTL_STORE_BACKEND=etcdv3
export STOLONCTL_STORE_ENDPOINTS=https://10.0.8.21:2379,https://10.0.8.22:2379,https://10.0.8.23:2379

# 2. Inspect Sentinel, Proxy, and Keeper health + current master assignment
stolonctl status

# 3. View the live cluster specification JSON
stolonctl spec

# 4. Patch usePgrewind and failInterval online without restarting Keepers
stolonctl update --patch '{"usePgrewind": true, "failInterval": "30s", "pgParameters": {"wal_log_hints": "on"}}'

# 5. Trigger a controlled master switchover by marking current master keeper as failed
stolonctl failkeeper keeper0

Shared Responsibility & Platforms

What your team owns and what JusDB owns.

Managed cloud databases automate much of the infrastructure layer, but your team still owns query performance, capacity, cost, and incident decisions. We support legacy Stolon clusters and execute migrations across Linux VMs, Kubernetes, AWS, GCP, and Azure.

Operational LayerCustomer TeamJusDB DBRE Team
Application Connection Strings (`stolon-proxy`)Connect apps to `stolon-proxy` Service/VIP and coordinate cutover windowsStabilize `stolon-proxy` keepalives and plan transition to PgBouncer + HAProxy
`stolonctl` Cluster Specification & KeepersApprove cluster spec patches and maintenance windowsTune `failInterval`, `usePgrewind`, `synchronousReplication`, and `pgParameters`
Consensus Store (etcd v3 / Consul)Provide VM/container placement across 3 availability zonesMigrate legacy `etcdv2` stores to `etcdv3` and monitor fsync latency
Stolon to Patroni / CloudNativePG MigrationProvision target VMs or Kubernetes namespacesBuild standby/logical replication bridge, run staging rehearsals, and execute cutover
24x7 Incident Triage & Legacy Support (where contracted)Receive Slack/PagerDuty notifications on SLA eventsProvide 24x7 on-call coverage for Stolon incidents within P1-P4 SLA targets where contracted

Customer Boundary

What stays in your control

  • Set business priorities, application requirements, and release plans
  • Approve production changes, except routine actions you have pre-approved
  • Own your cloud accounts, access policies, and vendor relationships
  • Decide when maintenance can happen and how quickly service must recover
  • Move the work in-house or to another provider after your agreement's notice period, with your data returned or deleted and the transition help your agreement sets out (Terms, section 8)

JusDB Execution Scope

What our DBREs execute for you

  • Monitor database health, investigate alerts, and involve the right people
  • Review query performance, replication, capacity, and backup health
  • Carry out approved changes and update the operating instructions they affect
  • Report completed work, open risks, and recommended next steps

Orchestrator Comparison & Modernization Paths

Stolon vs modern alternatives and how to engage JusDB.

Compare Stolon against Patroni, repmgr, and pg_auto_failover, then choose between a turnkey Stolon-to-Patroni migration, interim Stolon support, or a free modernization audit.

Evaluation VectorJusDB Stolon DBREPatroni / CloudNativePGManaged Cloud (RDS/Aurora)
Decoupled Architecture (Keeper, Sentinel, Proxy)Independent Go-native processes segregating database management (keeper), cluster leadership (sentinel), and client routing (proxy) for modular resiliencePatroni runs unified Python daemons per node with external proxy dependencies (HAProxy/PgBouncer); CloudNativePG is strictly K8s CRD-coupledOpaque monolithic managed control plane where proxy routing, failover, and compute layers cannot be tuned or debugged independently
DCS-Agnostic Coordination (etcd, Consul, K8s)Flexible distributed consensus backends supporting etcd, Consul, or native Kubernetes ConfigMaps/Secrets without code refactoringPatroni supports etcd/Consul/K8s; CloudNativePG is strictly locked to Kubernetes API and cannot run on VMs or bare metalProprietary single-vendor storage consensus locking workloads into proprietary cloud regions and hypervisors
Failover Speed & Split-Brain QuorumAutomated failover designed for sub-30-second recovery, with sentinel quorum election, keeper generation counters, and client proxy auto-disconnect on primary demotionPatroni achieves sub-30s failover with DCS lease ttl; CloudNativePG relies on K8s controller reconciliation loopsCloud failovers often require 60-120+ seconds of DNS propagation and connection timeout drops across availability zones
Maintenance, Modernization & Upgrade PathExpert lifecycle review and low-downtime migration pathways from legacy Stolon clusters to modern Patroni or CloudNativePG stacksActive upstream development communities; however, cross-tool migration from Stolon requires specialized replication bridgingTeams stuck on unmaintained Stolon releases fearing cluster collapse, or forced into disruptive multi-hour cloud migration outages
Infrastructure Flexibility (Bare Metal, VMs & K8s)Consistent high availability topologies deployable uniformly across on-prem bare metal, private cloud VMs, and Kubernetes clustersCloudNativePG is K8s-only; Patroni spans VMs and K8s; both require separate infrastructure provisioning automationStrict vendor cloud lock-in preventing portability between on-premises datacenters, AWS, GCP, and private clouds
Monitoring & Incident ResponseContinuous stolonctl cluster data inspection, sentinel quorum health checks, and senior DBREs on your incident bridge. Initial-response targets: 2 to 4 hours in covered business hours; 15 minutes for P1 incidents with 24x7 on-call. Targets, not resolution guarantees.Community Slack/GitHub issues with no emergency SLA, or premium vendor add-on contracts costing tens of thousands annuallyInternal engineers trying to diagnose etcd keeper lease timeouts and proxy socket disconnects during major production downtime
Modernization Project

Stolon to Patroni or CloudNativePG Migration

Fixed-scope engagement to retire unmaintained Stolon v0.17.0 and transition to Patroni 4.x or CloudNativePG with minimal cutover downtime.

  • Complete audit of your current `stolonctl spec` and PostgreSQL version compatibility.
  • Side-by-side Patroni or CloudNativePG build synced via physical or logical replication.
  • Rehearsed cutover replacing `stolon-proxy` with PgBouncer + HAProxy or K8s Services.
Managed DBRE Retainer

Interim Stolon Support & Operations

Need time before you can migrate off Stolon? Our PostgreSQL DBREs keep your existing Stolon cluster stable and backed up.

  • 15-minute P1, 30-minute P2, 60-minute P3, and 90-minute P4 response targets under a 24x7 support agreement.
  • Proactive monitoring of Keeper convergence, Sentinel elections, and etcd health.
  • Verified pgBackRest / Barman point-in-time recovery drills.
Free Engineering Entry Point

Free Stolon Risk & Modernization Audit

Running Stolon v0.16 or v0.17.0 in production? Get a senior PostgreSQL DBRE to review your cluster spec and design an exit plan.

  • Review of `stolonctl status`, `stolonctl spec`, and store backend version.
  • Immediate stabilization patch recommendations (`usePgrewind`, `failInterval`).
  • Step-by-step migration blueprint to Patroni or CloudNativePG.

Procurement and security

Ready for legal and security review.

Mutual NDA before any access, least-privilege credentials in your vault, and security controls aligned with ISO 27001 and SOC 2 Type II. JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12).
  • Mutual NDA before any access
  • Named individual accounts only
  • Read-only access by default
  • ISO 27001 & SOC 2 Type II: aligned, certification in progress
  • Mutual NDA before any access

    We sign a mutual NDA before viewing schemas, logs, slow-query captures, or cloud topology.

  • Least-privilege, named credentials

    Engineers connect through your bastion, VPN, or SSM using named accounts with read-only permissions by default.

  • Change control & approval gates

    Production DDL, parameter changes, and failovers follow your change-management workflow with rollback steps prepared first.

  • Named leadership & direct escalation

    Engagements are led by named senior database reliability engineers in India with direct Slack, Teams, and PagerDuty channels.

Stolon Operations & Migration FAQ

Frequently asked Stolon questions.

Synced 1-to-1 with our structured FAQPage schema. Running Stolon in production and planning your migration to Patroni or CloudNativePG? Talk with our PostgreSQL DBRE team.

Still have a question?

Ask it on a scoping call. No production access needed.

Book a 30-min scoping call (opens Google Calendar in a new tab)

Is Stolon still actively maintained for PostgreSQL?

No. Sorint.lab's last upstream Stolon release was **v0.17.0 in May 2021**, and the GitHub repository has been inactive since then. While existing Stolon clusters on PostgreSQL 12 to 15 continue to function, Stolon does not receive security patches or updates for PostgreSQL 16, 17, and 18 replication changes. For all new deployments and upcoming PostgreSQL upgrades, JusDB recommends migrating from Stolon to **Patroni** (for Linux VMs and hybrid clusters) or **CloudNativePG** (for Kubernetes).

How do Stolon's Keeper, Sentinel, and Proxy components work together?

Stolon splits orchestration across three stateless/stateful Go binaries: (1) **`stolon-keeper`** runs alongside each PostgreSQL instance and configures `postgresql.conf` and replication state to match the cluster goal; (2) **`stolon-sentinel`** runs one or more leader-elected control loops that monitor Keepers and write the authoritative `ClusterData` state into etcd or Consul; and (3) **`stolon-proxy`** watches `ClusterData` and forwards client TCP connections to the current master Keeper, forcibly severing connections if the master changes.

Why do Stolon standby Keepers get stuck in `converging` after a failover?

By default, Stolon's cluster specification sets `usePgrewind: false`. When an unplanned failover promotes a standby Keeper onto a new timeline while the old master had unflushed local WAL records, the old master cannot stream from the new master without running `pg_rewind`, and stays stuck in `converging` until an operator intervenes or patches `"usePgrewind": true` with `wal_log_hints = on`.

How do we migrate a live production database from Stolon to Patroni without long downtime?

Because Stolon manages standard PostgreSQL data directories underneath `stolon-keeper`, we use one of two low-downtime methods: (1) **Cascading Streaming Standby**: we attach a new 3-node Patroni cluster as a cascading physical standby (`standby_cluster`) of the current Stolon master, wait for WAL replay lag to reach 0 bytes, pause writes on `stolon-proxy`, and promote the Patroni leader in under 30 seconds; or (2) **Logical Replication**: when upgrading PostgreSQL major versions simultaneously, we create a logical publication on the Stolon master and subscribe from the new Patroni cluster.

Can `stolon-proxy` load-balance read queries across standby Keepers?

No. `stolon-proxy` only routes traffic to the single active master Keeper. If you need read-replica load balancing or transaction-level connection pooling on an existing Stolon cluster, we deploy HAProxy and PgBouncer alongside Stolon (or transition you to Patroni + HAProxy + PgBouncer).

What are JusDB's SLA response targets for Stolon support and migrations?

Under a 24x7 support agreement, JusDB publishes explicit initial-response targets across all four severity tiers: 15 minutes for P1 (Critical production outage, `stolon-proxy` drop, or failed Keeper convergence), 30 minutes for P2 (High degradation), 60 minutes for P3 (Medium issue), and 90 minutes for P4 (Low routine request). For business-hours contracts, initial response is 2 to 4 hours during covered business hours (Mon-Fri 09:00-18:00 IST, UTC+5:30).