Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PostgreSQL HA

Avatar for bjreath bjreath
November 21, 2012

PostgreSQL HA

Avatar for bjreath

bjreath

November 21, 2012
Tweet

More Decks by bjreath

Other Decks in Programming

Transcript

  1. HA Techniques • Shared Disk • File System Replication (DRBD)

    • Transaction Log Shipping (WAL) Wednesday, November 21, 12
  2. Log Shipping • Master - continuous archive mode • Slave(s)

    - continuous recovery mode • warm standby • File-based versus streaming Wednesday, November 21, 12
  3. Hot Standby • Allows standby servers to service read queries

    • Useful for distributing read load across database servers • Asynchronous behavior may cause inconsistency across nodes Wednesday, November 21, 12
  4. Node Promotion • pg_ctl promote • Virtual IPs • Heartbeat

    / Pacemaker • keepalived Wednesday, November 21, 12
  5. Master-Slave with Rails • Master services all reads & writes

    • Master writes & slaves read • Octopus gem • Round-robin read query assignment • Introduces complexities Wednesday, November 21, 12
  6. References • PostgreSQL 9.2 Docs • Backup and Restore •

    High Availability, Load Balancing, and Replication Wednesday, November 21, 12