Top Banner
Patroni PGConf.EU 2015 by Feike Steenbergen
8

by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Nov 11, 2018

Download

Documents

vodieu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

PatroniPGConf.EU 2015

by Feike Steenbergen

Page 2: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Some Zalando numbers

200+ deployment units (WARs)

1300+ production instances

120+ database master instances

100+ different databases

700+ technologists

10 database engineers

Page 3: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

What problems do we have?

● We don’t have automatic failover● New clusters are managed by the teams● These clusters will run on AWS● We expect more instance failures on

AWS● Many new clusters will be created● We don’t like to be called, at night, or at

all

Page 4: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Patroni

● Forked from Compose Governor● manages a single PostgreSQL cluster● requires etcd, Zookeeper, or Consul● is aware of its peers● has an api

○ healthcheck/status○ management

● Is running production systems

Page 5: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Patroni in general

Page 6: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Patroni on AWS (Spilo)

Auto Scaling Group

Master ELBprod.example.com

Replica ELBprod-replica.example.com

Page 7: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Patroni in our Datacenter

Zookeeper

10.0.0.4

● Patroni has a callbacks featureon some events a configured script can be run

● We use it to switch IP-address from master to slave and vice-versa

10.0.1.4

Page 8: by Feike Steenbergen PGConf.EU 2015 - PostgreSQL wiki · Patroni Forked from Compose Governor manages a single PostgreSQL cluster requires etcd, Zookeeper, or Consul is aware of its

Thanks

Tech Blog: tech.zalando.com

GitHub: github.com/zalando

Patroni: github.com/zalando/patroni

Twitter: @ZalandoTech

Jobs: http://tech.zalando.com/jobs