Software Alternatives, Accelerators & Startups

Patroni VS StackGres

Compare Patroni VS StackGres and see what are their differences

Patroni logo Patroni

A Template for PostgreSQL HA with ZooKeeper, Etcd, or Consul

StackGres logo StackGres

Fully-featured platform for running PostgreSQL on Kubernetes
  • Patroni Landing page
    Landing page //
    2022-11-01
  • StackGres Landing page
    Landing page //
    2022-05-20

Patroni features and specs

No features have been listed yet.

StackGres features and specs

  • Integrated PostgreSQL Management
    StackGres provides a comprehensive suite for managing PostgreSQL clusters, simplifying configuration, deployment, and maintenance.
  • Scalability
    StackGres supports dynamic scaling of PostgreSQL clusters, allowing for flexible resource allocation based on workload demands.
  • Kubernetes Native
    Built on Kubernetes, StackGres leverages its powerful orchestration capabilities for high availability and container management.
  • Security Features
    Includes advanced security features like SSL/TLS, authentication, and role-based access control to safeguard data and connections.
  • Monitoring and Alerting
    Comes with integrated monitoring and alerting tools, providing insights into database performance and health metrics.

Possible disadvantages of StackGres

  • Complexity
    The Kubernetes-based environment can introduce complexity for users unfamiliar with container orchestration and management.
  • Resource Intensive
    Running StackGres requires significant computational resources, which might be overkill for small-scale or less demanding applications.
  • Learning Curve
    New users may face a steep learning curve in mastering StackGres for effective management of PostgreSQL in a Kubernetes environment.
  • Cost Considerations
    While powerful, using Kubernetes and associated resources for StackGres can lead to higher operational costs.
  • Dependency on Kubernetes
    Requires a functional Kubernetes cluster, which might be a barrier for organizations not currently using Kubernetes.

Analysis of Patroni

Overall verdict

  • Patroni is a mature, widely-adopted, and battle-tested open-source template for building highly available PostgreSQL clusters. It reliably automates leader election and failover using a distributed consensus store, making it a solid choice for production HA setups.

Why this product is good

  • Provides automated failover and leader election for PostgreSQL, minimizing downtime
  • Integrates with proven distributed configuration stores like etcd, Consul, ZooKeeper, and Kubernetes
  • Open-source, actively maintained, and backed by a strong community (developed by Zalando)
  • Highly configurable with support for synchronous and asynchronous replication
  • Widely used in production environments, so it's well-documented and battle-tested
  • Includes a REST API and CLI (patronictl) for cluster management and monitoring
  • Works well in both bare-metal/VM and Kubernetes deployments

Recommended for

  • Teams running production PostgreSQL that require high availability and automated failover
  • DevOps and SRE teams managing database clusters at scale
  • Organizations deploying PostgreSQL on Kubernetes
  • Companies needing a robust, self-managed alternative to expensive managed database HA solutions
  • Users already leveraging etcd, Consul, or ZooKeeper for service coordination

Patroni videos

Patroni 2020-04-09

More videos:

  • Review - Management of High-Availability PostgreSQL clusters with Patroni | A.Klyukin, A.Kukushkin
  • Review - PATRONI 😋 MARIHUANA REVIEW

StackGres videos

No StackGres videos yet. You could help us improve this page by suggesting one.

Add video

Category Popularity

0-100% (relative to Patroni and StackGres)
Databases
100 100%
0% 0
Cloud Computing
0 0%
100% 100
Data Dashboard
100 100%
0% 0
Developer Tools
34 34%
66% 66

User comments

Share your experience with using Patroni and StackGres. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Patroni might be a bit more popular than StackGres. We know about 11 links to it since March 2021 and only 10 links to StackGres. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

Patroni mentions (11)

  • PgDog is funded and coming to a database near you
    Patroni 1.0 was released in 2016, i.e ~10 years ago. https://github.com/patroni/patroni. - Source: Hacker News / 3 months ago
  • Kuvasz-streamer: open-source CDC for Postgres for low latency replication
    PG's internal wal-level replication? Primary to a read-replica, and then switch the read to become the primary. You'll have a bit of downtime while you stop connections on the original server, switch the new server to primary, and update your app config to connect to the new server. I believe that's a pretty standard way to provide "HA" postgres. (We use Patroni for our HA setup) - Source: Hacker News / over 1 year ago
  • Ask HN: Best Tools for High Availability PostgreSQL?
    Do you need HA, or do you want to minimize downtime? At work we have something like an "error budget", were we accept downtime but try to minimize it. As such we have two nodes with one floating ip and a shared disk. The switch over takes as long as stopping the database on the first node, starting up the database on the second one and switching over the ip. Stuff like kernel updates takes us <1 minute of... - Source: Hacker News / almost 2 years ago
  • Ask HN: Are there any open source forks of nomad smd consul?
    > I think etcd is basically a k8s only project now I hate etcd with the best of them, but etcd is used in a lot more places than just kubernetes: https://github.com/apache/apisix/blob/master/docs/en/latest/FAQ.md#why-does-apache-apisix-use-etcd-for-the-configuration-center, https://github.com/zalando/patroni#patroni-a-template-for-postgresql-ha-with-zookeeper-etcd-or-consul (this one shows up on HN quite a... - Source: Hacker News / over 2 years ago
  • How to create postgres cluster in docker swarm?
    We have been using stolon + consul for years without issue in our swarm environments. It may also be possible with patroni. Source: about 3 years ago
View more

StackGres mentions (10)

  • TimescaleDB compresses time-series data
    At StackGres [1] we find Timescale to be one of the most used extensions. Timescale is quite a successful project! StackGres is actually the first solution recommended by Timescale for self-hosting with Kubernetes operators [2]. So if you are into Kubernetes (or if not, consider it, using something like K3s [3] is quite straightforward and lightweight on resources), this is probably a great option to self-host... - Source: Hacker News / 3 months ago
  • Show HN: SQL-tap – Real-time SQL traffic viewer for PostgreSQL and MySQL
    * Latency. Yes, yes, yes, they add "microseconds" vs "milliseconds for queries", and that's true, but just part of the story. There's an extra hop. There's two extra sets of TCP layers being traversed. If the hop is local (say a sidecar, as we do in StackGres) it adds complexity in its deployment and management (something we solved by automation, but was an extra problem to solve) and consumes resources. If it's a... - Source: Hacker News / 7 months ago
  • Application Less Containers
    This is conceptually similar to what we did for Postgres extensions at the StackGres [1] project. I gave a talk at a Kubecon about it [2]. However, this scheme is not perfect. Some Kubernetes security solutions enforce immutable containers, and once the agent pulls any additional file into the container, it will be flagged. It's also harder to reason about the security of the image (think CVEs, etc), given that... - Source: Hacker News / about 1 year ago
  • Pg_lakehouse: Query Any Data Lake from Postgres
    I applaud the decision to use AGPL-3.0. For me, it's a license that provides forward guarantees to the Community: no proprietary forks can happen, so any fork will be an OSS fork from which the upstream project may benefit too, which benefits all users. That's the reason we chose this license for StackGres [1], another project in the Postgres space. [1]: https://stackgres.io. - Source: Hacker News / over 2 years ago
  • Keycloak with PostgreSQL on Kubernetes
    This is good and interesting recipe to get Keycloak and Postgres on Kubernetes. There is an important improvement, though: the Postgres deployed here is not production ready (high availability, backups, monitoring, etc). We run Keycloak on StackGres [1] which gives us production-ready Postgres setup (disclaimer: it's dogfooding). Happy to share the YAML manifests used to deploy Keycloak with StackGres. Maybe we... - Source: Hacker News / over 3 years ago
View more

What are some alternatives?

When comparing Patroni and StackGres, you can also consider the following products

Grafana - Data visualization & Monitoring with support for Graphite, InfluxDB, Prometheus, Elasticsearch and many more databases

Kubernetes - Kubernetes is an open source orchestration system for Docker containers

CloudNativePG - CloudNativePG is the Kubernetes operator that covers the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture, using native streaming replication.

TiDB - A distributed NewSQL database compatible with MySQL protocol

TablePlus - Easily edit database data and structure

Google Cloud Spanner - Google Cloud Spanner is a horizontally scalable, globally consistent, relational database service.