PgConf.Russia 2017 talks

Alexander Kukushkin
Zalando SE, Database Engineer

Alexander is a main contributor to the Patroni project. At Zalando SE he is responsible for creating and maintaining of hundreds PostgreSQL clusters with sizes from a few Megabytes up to 10 Terabytes.

In the modern world, an increasing number of IT companies are moving their resources to the cloud and Zalando is not an exception. A rapid growth our company is experiencing along with an adoption of microservices were the main driving forces behind the changes introduced into the deployment procedure of new PostgreSQL clusters and the solution of the automatic failover problem. The majority of existing solutions for automatic failover require manual configuration of every cluster instance and complicates provisioning new clusters and new nodes into existing cluster. Such an approach doesn’t really work well in the cloud. Patroni uses Etcd, Zookeeper or Consul to store information about the current cluster state and keeps postgres configuration parameters. It solves the task of automatic failover and provides an easy way to provision new cluster nodes. It is capable of changing PostgreSQL configuration parameters across all cluster nodes and performing a scheduled restart of one or all the nodes of a cluster at a given time. Currently, we are running about one hundred database clusters on the AWS and several dozens clusters in the classical data-center, all managed by Patroni.

Patroni is a Python open-source daemon developed by Zalando in cooperation with other contributros on GitHub: https://github.com/zalando/patroni

VIDEO

Slides