pg_paxos: Table Replication through Distributed Consensus by Marco Slot

Tuesday, November 15 at 1:20-2:15  

pg_paxos provides yet another way of doing table replication in PostgreSQL by automatically replicating a query log through Multi-Paxos. Unlike existing replication solutions, pg_paxos can provide consistent, fault-tolerant, multi-master replication across PostgreSQL servers, at the cost of high read- and write latencies and low throughput. pg_paxos is not a general replication solution, but is especially suitable for applications such as automated fail-over, distributed locking, and managing cluster membership, and can potentially replace components such as Zookeeper.

pg_paxos is implemented primarily in PL/pgSQL, which seems odd, but has two significant advantages: 1) Paxos can be difficult to implement because nodes need to keep their local state in a durable data store. In PL/pgSQL ACID transactions come for free, making the code simple and easy to understand. 2) The core parts of pgpaxos can run in restricted environments such as Heroku and Amazon RDS.

This talk will attempt to explain the Paxos algorithm and the Multi-Paxos technique and why they are not as hard as they are often portrayed. We will discuss the internals of pg_paxos and several applications. Finally, we will show a live demo of how to deploy pg_paxos to implement a distributed cron service.

About the Speaker

Marco has an M.S. in Parallel and Distributed Computer Systems from VU University Amsterdam and a PhD on cooperative self-driving cars at Trinity College Dublin. While studying, he also worked as a software engineer on Amazon CloudFront and Route 53 for several years, driving the design of latency-driving request routing and several other key features. He now works as a principal engineer at Citus Data.


Monday, September 12, 2016 - 21:00