Slony

From PostgreSQL wiki

Jump to: navigation, search

Contents

Overview

Slony-I is a "master to multiple slaves" replication system supporting cascading (e.g. - a node can feed another node which feeds another node...) and failover.

Status

Production

Version 1.2
Production
Version 2.0
Released, some using it in production

Contacts

Mailing Lists Slony Web site

General Information

Scalability Single origin (master), up to 20 subscribers.
Read scaling yes
Write scaling no/slight inverse
Triggers/procedures Yes
Parallel query No
Failover/High Availability Yes
Online provisioning Yes
PostgreSQL upgrades Yes
Detached node/WAN Yes, but can be clumsy
PostgreSQL core modifications required No
Programming languages SQL, pl/pgsql, C/SPI, C
Licensing Postgres License
Complete clustering solution No. (load balancer, pooler required)
PostgreSQL versions Multiple PG versions - varies somewhat by Slony-I version.

Clustering model

Asynchronous cascading master-slave replication, row-based, using triggers and queueing in the database.

Slony-I can be combined with a pooler and load-balancer, such as pgPool2 or DBD::Multiplex, to form a complete clustering system.

Use-case

  • Cascading replication (master-->slave-->slave)
  • Partial replication
  • Upgrades of PostgreSQL and server platform
  • Failover and slave promotion
  • Online provisioning
  • Limited detach/reattach slaves
  • Maturity and field-testing (in production for 5 years)

Slony-I is a "master to multiple slaves" replication system supporting cascading (e.g. - a node can feed another node which feeds another node...) and failover. The big picture for the development of Slony-I is that it is a master-slave replication system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of slave systems. Slony-I is a system designed for use at data centers and backup sites, where the normal mode of operation is that all nodes are available.

Drawbacks

  • Not a complete clustering solution
  • Complexity of setup
  • Limitations on schema changes
  • Performance of large bulk loads and large object replication
  • Write overhead and associated maintenance (vacuum etc.)
  • Multiple points of monitoring required
  • Master-slave, replication lag

The main drawback to Slony-I even as a replication system is the complexity of its setup and administration. The design of the system, with the database itself being used for queueing row updates, also significantly increases the amount of data writing and I/O done by the DBMS.

Also, since Slony-I is asynchronous master-slave, all writes have to be segregated to the master. Additionally, there is a noticeable lag (1-3 seconds) between the master and the slaves which may cause users to have an inconsistent view of the data.

Project Sponsors

Work sponsored by Afilias, most developers are at Afilias. (Jan Wieck, Christopher Browne, Steven Singer)

Web site hosted by CommandPrompt

Support

Slony-I is probably the best commercially supported replication/clustering solution. The following companies offer Slony-I support with PostgreSQL support: CommandPrompt, EnterpriseDB, Fujitsu Australia, and 2ndQuadrant. Consulting on Slony-I is also available from such companies as PostgreSQL Experts, SRA, Credativ, and End Point.

Other Information

Personal tools