PostgreSQL cloud native High Availability and more.
Go to file
Simone Gotti bcea7a7548
Merge pull request #913 from sgotti/ci_update_kind
ci: update bsycorp/kind to latest version
2023-09-06 12:02:01 +02:00
.agola ci: update bsycorp/kind to latest version 2023-09-06 10:05:47 +02:00
.github/ISSUE_TEMPLATE github: add github issue templates 2020-03-02 11:02:59 +01:00
cmd *: Add ability to disable sync replication when there're not enough ready standbys 2021-09-15 16:00:32 +02:00
doc *: Add ability to disable sync replication when there're not enough ready standbys 2021-09-15 16:00:32 +02:00
examples fix: update rbac apiVersion 2022-10-05 20:29:58 +07:00
internal Switch uuid package to get around GO-2020-0018 2022-05-31 10:34:26 +02:00
licenses keeper: write files atomically 2017-04-25 10:39:38 +02:00
logos logos: add stolon svg logo 2018-06-08 12:04:49 +02:00
scripts ci: update bsycorp/kind to latest version 2023-09-06 10:05:47 +02:00
tests/integration Switch uuid package to get around GO-2020-0018 2022-05-31 10:34:26 +02:00
.dockerignore agola ci: test, build and push stolon example docker images 2019-10-14 17:15:54 +02:00
.gitignore Introduce sub command register under stolonctl to auto register stolon for service discovery 2019-03-02 01:07:30 +05:30
CHANGELOG.md Release v0.17.0 2021-09-02 14:57:29 +02:00
CODE_OF_CONDUCT.md ADD CODE OF CONDUCT.md 2018-01-10 15:34:36 +01:00
DCO Initial Commit. 2015-10-09 16:08:27 +02:00
go.mod Switch uuid package to get around GO-2020-0018 2022-05-31 10:34:26 +02:00
go.sum Switch uuid package to get around GO-2020-0018 2022-05-31 10:34:26 +02:00
LICENSE Initial Commit. 2015-10-09 16:08:27 +02:00
Makefile Update example image Dockerfile 2019-10-14 09:55:54 +02:00
README.md *: add support for PostgreSQL 15 2022-10-19 13:56:20 +02:00
test test: re-enable gofmt tests 2021-10-07 09:48:23 +02:00

stolon - PostgreSQL cloud native High Availability

Build Status Discourse Go Report Card Downloads Latest release

Stolon Logo

stolon is a cloud native PostgreSQL manager for PostgreSQL high availability. It's cloud native because it'll let you keep an high available PostgreSQL inside your containers (kubernetes integration) but also on every other kind of infrastructure (cloud IaaS, old style infrastructures etc...)

For an introduction to stolon you can also take a look at this post

Features

  • Leverages PostgreSQL streaming replication.
  • Resilient to any kind of partitioning. While trying to keep the maximum availability, it prefers consistency over availability.
  • kubernetes integration letting you achieve postgreSQL high availability.
  • Uses a cluster store like etcd, consul or kubernetes API server as an high available data store and for leader election
  • Asynchronous (default) and synchronous replication.
  • Full cluster setup in minutes.
  • Easy cluster administration
  • Can do point in time recovery integrating with your preferred backup/restore tool.
  • Standby cluster (for multi site replication and near zero downtime migration).
  • Automatic service discovery and dynamic reconfiguration (handles postgres and stolon processes changing their addresses).
  • Can use pg_rewind for fast instance resynchronization with current master.

Architecture

Stolon is composed of 3 main components

  • keeper: it manages a PostgreSQL instance converging to the clusterview computed by the leader sentinel.
  • sentinel: it discovers and monitors keepers and proxies and computes the optimal clusterview.
  • proxy: the client's access point. It enforce connections to the right PostgreSQL master and forcibly closes connections to old masters.

For more details and requirements see Stolon Architecture and Requirements

Stolon architecture

Documentation

Documentation Index

Installation

Stolon is available in brew. It is unofficial and not supported by the project. So check the version before installing using brew.

Step to install using brew

Quick start and examples

Project Status

Stolon is under active development and used in different environments. Probably its on disk format (store hierarchy and key contents) will change in future to support new features. If a breaking change is needed it'll be documented in the release notes and an upgrade path will be provided.

Anyway it's quite easy to reset a cluster from scratch keeping the current master instance working and without losing any data.

Requirements

  • PostgreSQL 15, 14, 13, 12, 11, 10, 9.6

  • etcd2 >= v2.0, etcd3 >= v3.0, consul >= v0.6 or kubernetes >= 1.8 (based on the store you're going to use)

  • OS: currently stolon is tested on GNU/Linux (with reports of people using it also on Solaris, *BSD and Darwin)

build

To build stolon we usually test and support the latest two major versions of Go like in the Go release policy.

make

High availability

Stolon tries to be resilient to any partitioning problem. The cluster view is computed by the leader sentinel and is useful to avoid data loss (one example over all avoid that old dead masters coming back are elected as the new master).

There can be tons of different partitioning cases. The primary ones are covered (and in future more will be added) by various integration tests

FAQ

See here for a list of faq. If you have additional questions please ask.

Contributing to stolon

stolon is an open source project under the Apache 2.0 license, and contributions are gladly welcomed! To submit your changes please open a pull request.

Contacts

  • For general discussion about using and developing stolon, join the stolon forum
  • For bugs and feature requests file an issue