SlideShare a Scribd company logo
1 of 39
Download to read offline
Best Practices for HA and Replication for
PostgreSQL in Virtualized Environments

March 2013    Jignesh Shah & vPostgres Team @ VMware




                                              © 2010 VMware Inc. All rights reserved
Agenda
§  Enterprise needs
§  Technologies readily available
    •  Virtualization Technologies for HA
    •  Replication modes of PostgreSQL (in core)
§  Datacenter Deployment Blueprints
    •  HA within Datacenter,
    •  Read-Scaling within Datacenter
    •  DR/Read-Scaling across Datacenters




2
Enterprise Needs for
    Mission Critical Databases




3
Causes of Downtime

§  Planned Downtime
    •  Software upgrade (OS patches, SQL Server cumulative updates)
    •  Hardware/BIOS upgrade
§  Unplanned Downtime
    •  Datacenter failure (natural disasters, fire)
    •  Server failure (failed CPU, bad network card)
    •  I/O subsystem failure (disk failure, controller failure)
    •  Software/Data corruption (application bugs, OS binary corruptions)
    •  User Error (shutdown a SQL service, dropped a table)




4
Enterprises need HA

§  HA - High Availability of the Database Service
     •  Sustain Database Service failure if it goes down
     •  Sustain Physical Hardware Failures
     •  Sustain Data/Storage Failures
     •  100% Data Guarantee


§  Goal
     •  Reduce Mean Time To Recover (MTTR) or Recovery Time Objective (RTO)
     •  Typically driven by SLAs




 5
Planning a High Availability Strategy

§  Requirements
     •  Recovery Time Objective (RTO)
       •  What does 99.99% availability really mean?
     •  Recovery Point Objective (RPO)
       •  Zero data lost?
       •  HA vs. DR requirements

§  Evaluating a technology
     •  What’s the cost for implementing the technology?
     •  What’s the complexity of implementing, and managing the technology?
     •  What’s the downtime potential?
     •  What’s the data loss exposure?
                  Availability %	
           Downtime / Year	
         Downtime / Month *	
           Downtime / week	
  
"Two Nines" - 99% 	
                   3.65 Days	
                 7.2 Hours	
                  1.69 Hours	
  
"Three Nines" - 99.9% 	
               8.76 Hours	
                43.2 Minutes	
               10.1 Minutes	
  
"Four Nines" - 99.99% 	
               52.56 Minutes	
             4.32 Minutes	
               1.01 Minutes	
  
"Five Nines" - 99.999% 	
              5.26 Minutes	
              25.9 Seconds	
               6.06 Seconds	
  

                                                                   * Using a 30 day month	
  

 6
Enterprises need DR

§  DR – Disaster Recovery for your site
    •  Overcome Complete Site Failure
    •  Closest if not 100% Data Guarantee expected
      •  Some data loss may be acceptable
    •  Key Metrics
      •  RTO – Recovery Time Objective
          •  Time to Recover the service
      •  RPO – Recovery Point Objective




7
Enterprises also need Scale UP

§  Scale UP – Throughput increases with more resources given in the
    same VM
§  Though in reality limited by Amdahl’s law




8
Enterprises also need Scale Out

§  Scale Out – Throughput increases with more resources given via
    more nodes (VMs)
§  Typically Shared Nothing architecture (few Shared ‘something’)
§  Often results in “partitions” or “shards”




9
Scale Out - For Reads

§  Scale Out or Multi-Node Scaling for Reads
§  Online retailer Use Case
§  99% Reads and 1% Actual Write transactions




10
Scale Out - For Writes

§  Scale Out or Multi-nodes for Writes
§  Example Use case: 24/7 Booking system
§  Constant booking/changes/updates happening




11
CAP Theorem

§  Consistency
  •  all nodes see the same data at the same time
§  Availability
  •  Guarantee that every request receives a response about whether it was
      successful or failed
§  Partition Tolerance
  •  the system continues to operate despite arbitrary message loss or failure of
      part of the system




 12
Virtualization Technologies for HA




13
Virtualization Availability Features




14
VM Mobility

§  Server Maintenance
 •  VMware vSphere® vMotion® and
     VMware vSphere Distributed
     Resource Scheduler (DRS)
     Maintenance Mode
 •  Migrate running VMs to other
     servers in the pool
 •  Automatically distribute workloads
     for optimal performance
                                                    Key Benefits
§  Storage Maintenance                  •  Eliminate downtime for common
                                            maintenance
 •  VMware vSphere® Storage vMotion
                                         •  No application or end user impact
 •  Migrate VM disks to other storage
     targets without disruption          •  Freedom to perform maintenance
                                            whenever desired



15
VMware vSphere High Availability (HA)




§  Protection against host or operating system failure
 •  Automatic restart of virtual machines on any available host in cluster
 •  Provides simple and reliable first line of defense for all databases
 •  Minutes to restart
 •  OS and application independent, does not require complex configuration
     or expensive licenses

16
App-Aware HA Through Health Monitoring APIs

§  Leverage third-party solutions that integrate with VMware HA
  (for example, Symantec ApplicationHA)
                                   1
                                       Database Health Monitoring
                 VMware HA             •  Detect database service failures inside VM
  App
 Restart               3
                                   2
     2     APP               APP
                                       Database Service Restart Inside VM
           OS                OS
                                       •  App start / stop / restart inside VM
                   1                   •  Automatic restart when app problem detected




                                   3
                                       Integration with VMware HA
                                       •  VMware HA automatically initiated when
                                            •  App restart fails inside VM
                                            •  Heartbeat from VM fails




17
Simple, Reliable DR with VMware SRM

§  Provide the simplest and most reliable disaster protection and site
  migration for all applications
§  Provide cost-efficient replication of applications to failover site
§  Simplify management of recovery and migration plans
§  Replace manual run books with centralized recovery plans
§  From weeks to minutes to set up new plan
§  Automate failover and migration
  processes for reliable recovery
§  Provide for fast, automated failover
§  Enable non-disruptive testing
§  Automate failback processes




18
High Availability Options through Virtualization Technologies

                                                      PostgreSQL
                                                       Streaming
     Hardware Failure Tolerance
                                                      Replication
                                  Continuous
                                                                              VMotion
                                                     VMware FT
                                   Automated                               (Planned Downtime)
                                      Restart
                                                     RedHat/OS Cluster

                                                                     VMware HA

                                  Unprotected


                                                0%      10%                                     100%
                                                                    Application Coverage
§  Clustering too complex and expensive for most applications
§  VMware HA and FT provide simple, cost-effective availability
§  VMotion provides continuous availability against
 planned downtime
19
PostgreSQL
     Replication Modes




20
PostgreSQL Replication

§  Single master, multi-slave
§  Cascading slave possible with vFabric Postgres 9.2
§  Mechanism based on WAL (Write-Ahead Logs)
§  Multiple modes and multiple recovery ways
 •  Warm standby
 •  Asynchronous hot standby
 •  Synchronous hot standby
§  Slaves can perform read operations optionally
 •  Good for read scale
§  Node failover, reconnection possible




21
File-based replication
§  File-based recovery method using WAL archives
§  Master node sends WAL files to archive once completed
§  Slave node recovers those files automatically
§  Some delay for the information recovered on slave
 •  Usable if application can lose some data
 •  Good performance, everything is scp/rsync/cp-based
 •  Timing when WAL file is sent can be controlled
                                                              vPG
                                                   ile      slave 1
                       WAL file               WAL f
      vPG
     master

                               WAL Archive
                                  disk                        vPG
                                                            slave 2

22
Asynchronous replication

§  WAL record-based replication
§  Good balance performance/data loss
 •  Some delay possible for write-heavy applications
 •  Data loss possible if slaves not in complete sync due to delay
§  Possible to connect a slave to a master or a slave (cascading
 mode)



 vPG                              Slave 1                   Slave 1-1
master


     WAL shipping
                                 Slave 2                     Slave 1-2

23
Synchronous mode
§  COMMIT-based replication
 •  Only one slave in sync with master
 •  Master waits that transaction COMMIT happens on sync slave, then commits
§  No data loss based on transaction commit
 •  Performance impact
 •  Good for critical applications
§  Cascading slaves are async
                                               async


      vPG                            Slave 1             Slave 1-1
     master


      WAL shipping
                                     Slave 2             Slave 1-2
24
HA operations: failover and node
              reconnection




25
Node failover (1)

§  Same procedure for all the replication modes

       vPG
                                                        Slave
      master



§  Failover procedure
                                             Promotion
 •  Connect to slave VM
     ssh postgres@$SLAVE_IP
 •  Promote the slave
     pg_ctl promote
 •  recovery.conf renamed to recovery.done in $PGDATA
 •  Former slave able to run write queries



26
Node failover (2)

§  Locate archive disk to a new slave node
 •  Recreate new virtual disk on new node
 •  Update restore_command in recovery.conf of the remaining slaves
 •  Update archive_command in postgresql.conf of promoted slave
 •  Copy WAL files from remaining archive disk to prevent SPOF after loss of
     master




27
Node reconnection
§  In case a previously failed node is up again

         old
                                                         Promoted
        master
                                                           Slave
                          Reconnect
§  Reconnection procedure
  •  Connect to old master VM
      ssh postgres@$MASTER_IP
  •  Create recovery.conf depending on recovery mode wanted
      recovery_target_timeline = ‘latest’
      standby_mode = on
      restore_command = ’scp $SLAVE_IP:/archive/%f %p’
      primary_conninfo = 'host=$SLAVE_IP application_name=$OLD_NAME’
  •  Start node
     service postgresql start
  •  Important! Retrieving WAL is necessary for timeline switch
28
Additional tips

§  DB and server UI
  •  Usable as normal, cannot create objects on slave of course
§  wal_level
  •  ‘archive’ for archive only recovery
  •  ‘hot_standby’ for read-queries on slaves
§  pg_stat_replication to get status of connected slaves
      postgres=# SELECT pg_current_xlog_location(),
                 application_name,
                 sync_state,
                 flush_location
                 FROM pg_stat_replication;
      pg_current_xlog_location | application_name | sync_state | flush_location
     --------------------------+------------------+------------+----------------
      0/5000000                  | slave2          | async       | 0/5000000
      0/5000000                  | slave1          | sync       | 0/5000000
     (2 rows)

29
Virtualized PostgreSQL
     Datacenter Deployment
            Blueprints




30
Single Data Center Deployment

         Highly Available PostgreSQL database server with HA from virtualization environment




                                      DNS Name



   Applications




                                                                   Site 1
§  Easy to setup with one click HA
§  Handles CPU/Memory hardware issues
§  Requires Storage RAID 1 for storage protection (atleast)
§  RTO in couple of minutes




 31
vSphere HA with PostgreSQL 9.2 Streaming Replication)

§  Protection against HW/SW failures and DB corruption
§  Storage flexibility
 (FC, iSCSI, NFS)
§  Compatible w/ vMotion,
 DRS, HA
§  RTO in few seconds
§  vSphere HA + Streaming Replication
 •  Master generally restarted with vSphere HA
 •  When Master is unable to recover, the Replica can be promoted to master
 •  Reduces synchronization time
     after VM recovery




32
Single Data Center Deployment

                 Highly Available PostgreSQL database server with synchronous replication




                                    Virtual IP or
                                    DNS or
                                    pgPool or
  Applications
                                    pgBouncer




                                                                      Site 1
§  Synchronous Replication within Data Center
§  Low Down Time (lower than HA)
§  Automated Failover for hardware issues including Storage




 33
Multi-site Data Center Deployment

                    Replication across Data Centers with PostgreSQL for Read Scaling/DR




   Applications              Virtual IP or
                                                                          Site 2
                             pgPool or
                             pgBouncer




                                                         Site 1




§  Synchronous Replication within Data Center
§  Asynchronous replication across data enters
§  Read Scaling (Application Driver )                                     Site 3




  34
Multi-site Data Center Deployment

                     Replication across Data Centers with Write Scaling (requires sharding)




   Applications              Virtual IP or
                                                                             Site 2
                             pgPool or
                             pgBouncer




                                                               Site 1




§  Each Site has its own shard, its synchronous replica and
    asynchronous replicas of other sites
§  Asynchronous replication across data enters
                                                                              Site 3
§  HA/DR built-in
§  Sharding is application driven




  35
Hybrid Cloud

                                 Hybrid Cloud Scaling for Fluctuating Read peaks




                                 Virtual IP or
                                 pgPool or
                                 pgBouncer
  Applications
                                                                                    Site 1




                                                                  Cascaded
                                                                  Read
                                                                  Replicas




§  Many times reads go up to 99% of workload
§  (Example a sensational story that every one wants to read)
§  Synchronous Replication within Data Center
§  Asynchronous Replica slaves within Data Center and on Hybrid Clouds
§  More replicas are spun up when load increases and discarded when it decreases




 36
Summary

               PostgreSQL 9.2                          Future /Others
           •  Database Replication              •  BiDirectional Replication
               •  Synchronous
              •  Asynchronous                     •  Slony/Londiste, etc
               •  Log Shipping

                              Virtualization Platform
     Un-Planned downtime recovery          Disaster recovery
     •    vSphere HA + AppAware HA         •    Site Recovery Manager
     •    vSphere FT

     Planned downtime avoidance
     •    vMotion & Storage vMotion




37
Your Feedback is Important!




If interested,
§  Drop your               at end of session
§  Email: jshah@vmware.com




38
Thanks.
                            Questions?


     Follow us on twitter: @vPostgres
     vFabric Blog: http://blogs.vmware.com/vfabric/postgres




39

More Related Content

What's hot

PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldJignesh Shah
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsMydbops
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundMasahiko Sawada
 
Hitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning toolsHitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning toolsBjoern Rost
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Architecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterArchitecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterAshnikbiz
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and BenchmarksJignesh Shah
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
Built in physical and logical replication in postgresql-Firat Gulec
Built in physical and logical replication in postgresql-Firat GulecBuilt in physical and logical replication in postgresql-Firat Gulec
Built in physical and logical replication in postgresql-Firat GulecFIRAT GULEC
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Anastasia Lubennikova
 
Logical Replication in PostgreSQL
Logical Replication in PostgreSQLLogical Replication in PostgreSQL
Logical Replication in PostgreSQLEDB
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScaleMariaDB plc
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationAlexey Lesovsky
 
PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)Noriyoshi Shinoda
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific DashboardCeph Community
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetAlexey Lesovsky
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Sadayuki Furuhashi
 

What's hot (20)

PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparound
 
Hitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning toolsHitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning tools
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Architecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterArchitecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres Cluster
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Built in physical and logical replication in postgresql-Firat Gulec
Built in physical and logical replication in postgresql-Firat GulecBuilt in physical and logical replication in postgresql-Firat Gulec
Built in physical and logical replication in postgresql-Firat Gulec
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
 
Logical Replication in PostgreSQL
Logical Replication in PostgreSQLLogical Replication in PostgreSQL
Logical Replication in PostgreSQL
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
 
PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)PGConf.ASIA 2017 Logical Replication Internals (English)
PGConf.ASIA 2017 Logical Replication Internals (English)
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1Understanding Presto - Presto meetup @ Tokyo #1
Understanding Presto - Presto meetup @ Tokyo #1
 

Viewers also liked

PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Geographically Distributed PostgreSQL
Geographically Distributed PostgreSQLGeographically Distributed PostgreSQL
Geographically Distributed PostgreSQLmason_s
 
Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014EDB
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupEDB
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA EDB
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practiceAlexey Lesovsky
 
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analyticsmason_s
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuiteEDB
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015PostgreSQL-Consulting
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverJohn Paulett
 
PostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/SwitchbackPostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/SwitchbackVibhor Kumar
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Alexey Lesovsky
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaPostgreSQL-Consulting
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLThe Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLAshnikbiz
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High AvailabilityColin Charles
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Alexey Lesovsky
 

Viewers also liked (19)

PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance
 
Geographically Distributed PostgreSQL
Geographically Distributed PostgreSQLGeographically Distributed PostgreSQL
Geographically Distributed PostgreSQL
 
Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster Suite
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
PostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/SwitchbackPostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/Switchback
 
Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015Linux tuning for PostgreSQL at Secon 2015
Linux tuning for PostgreSQL at Secon 2015
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
 
The Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQLThe Magic of Tuning in PostgreSQL
The Magic of Tuning in PostgreSQL
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High Availability
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 

Similar to Best Practices of HA and Replication of PostgreSQL in Virtualized Environments

VMworld 2013: Virtualizing Highly Available SQL Servers
VMworld 2013: Virtualizing Highly Available SQL Servers VMworld 2013: Virtualizing Highly Available SQL Servers
VMworld 2013: Virtualizing Highly Available SQL Servers VMworld
 
VMworld 2014: Data Protection for vSphere 101
VMworld 2014: Data Protection for vSphere 101VMworld 2014: Data Protection for vSphere 101
VMworld 2014: Data Protection for vSphere 101VMworld
 
HPE + Veeam Technical Hands ON Workshop #1
HPE + Veeam Technical Hands ON Workshop #1HPE + Veeam Technical Hands ON Workshop #1
HPE + Veeam Technical Hands ON Workshop #1Tanawit Chansuchai
 
Introduction to failover clustering with sql server
Introduction to failover clustering with sql serverIntroduction to failover clustering with sql server
Introduction to failover clustering with sql serverEduardo Castro
 
Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5BusinesstoVirtual
 
Top Ten Private Cloud Risks
Top Ten Private Cloud RisksTop Ten Private Cloud Risks
Top Ten Private Cloud RisksSymantec
 
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part Two
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part TwoVMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part Two
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part TwoVMworld
 
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...Paula Koziol
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryMarkTaylorIBM
 
V mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationV mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationsolarisyourep
 
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, Cloudera
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, ClouderaLessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, Cloudera
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, ClouderaHostedbyConfluent
 
Virtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric VanderburgVirtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric VanderburgEric Vanderburg
 
What is coming for VMware vSphere?
What is coming for VMware vSphere?What is coming for VMware vSphere?
What is coming for VMware vSphere?Duncan Epping
 
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...VMworld
 
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data CenterVMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data CenterVMworld
 
Tokyo azure meetup #12 service fabric internals
Tokyo azure meetup #12   service fabric internalsTokyo azure meetup #12   service fabric internals
Tokyo azure meetup #12 service fabric internalsTokyo Azure Meetup
 
The have no fear guide to virtualizing databases
The have no fear guide to virtualizing databasesThe have no fear guide to virtualizing databases
The have no fear guide to virtualizing databasesSolarWinds
 
Self-Driving Storage and Applications Integration
Self-Driving Storage and Applications IntegrationSelf-Driving Storage and Applications Integration
Self-Driving Storage and Applications IntegrationMarketingArrowECS_CZ
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowAndrew Miller
 
VMworld 2013: DRS: New Features, Best Practices and Future Directions
VMworld 2013: DRS: New Features, Best Practices and Future Directions VMworld 2013: DRS: New Features, Best Practices and Future Directions
VMworld 2013: DRS: New Features, Best Practices and Future Directions VMworld
 

Similar to Best Practices of HA and Replication of PostgreSQL in Virtualized Environments (20)

VMworld 2013: Virtualizing Highly Available SQL Servers
VMworld 2013: Virtualizing Highly Available SQL Servers VMworld 2013: Virtualizing Highly Available SQL Servers
VMworld 2013: Virtualizing Highly Available SQL Servers
 
VMworld 2014: Data Protection for vSphere 101
VMworld 2014: Data Protection for vSphere 101VMworld 2014: Data Protection for vSphere 101
VMworld 2014: Data Protection for vSphere 101
 
HPE + Veeam Technical Hands ON Workshop #1
HPE + Veeam Technical Hands ON Workshop #1HPE + Veeam Technical Hands ON Workshop #1
HPE + Veeam Technical Hands ON Workshop #1
 
Introduction to failover clustering with sql server
Introduction to failover clustering with sql serverIntroduction to failover clustering with sql server
Introduction to failover clustering with sql server
 
Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5
 
Top Ten Private Cloud Risks
Top Ten Private Cloud RisksTop Ten Private Cloud Risks
Top Ten Private Cloud Risks
 
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part Two
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part TwoVMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part Two
VMworld 2013: Implementing a Holistic BC/DR Strategy with VMware - Part Two
 
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...
Implementing a Disaster Recovery Solution using VMware Site Recovery Manager ...
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster Recovery
 
V mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationV mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentation
 
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, Cloudera
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, ClouderaLessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, Cloudera
Lessons from the field: Catalog of Kafka Deployments | Joseph Niemiec, Cloudera
 
Virtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric VanderburgVirtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric Vanderburg
 
What is coming for VMware vSphere?
What is coming for VMware vSphere?What is coming for VMware vSphere?
What is coming for VMware vSphere?
 
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...
VMworld 2013: Three Advantages of Running Cloud Foundry in a VMware Private C...
 
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data CenterVMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
VMworld 2013: Maximize Database Performance in Your Software-Defined Data Center
 
Tokyo azure meetup #12 service fabric internals
Tokyo azure meetup #12   service fabric internalsTokyo azure meetup #12   service fabric internals
Tokyo azure meetup #12 service fabric internals
 
The have no fear guide to virtualizing databases
The have no fear guide to virtualizing databasesThe have no fear guide to virtualizing databases
The have no fear guide to virtualizing databases
 
Self-Driving Storage and Applications Integration
Self-Driving Storage and Applications IntegrationSelf-Driving Storage and Applications Integration
Self-Driving Storage and Applications Integration
 
Virtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - VarrowVirtualizing Tier One Applications - Varrow
Virtualizing Tier One Applications - Varrow
 
VMworld 2013: DRS: New Features, Best Practices and Future Directions
VMworld 2013: DRS: New Features, Best Practices and Future Directions VMworld 2013: DRS: New Features, Best Practices and Future Directions
VMworld 2013: DRS: New Features, Best Practices and Future Directions
 

More from Jignesh Shah

Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataJignesh Shah
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper lookJignesh Shah
 
Deep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseDeep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseJignesh Shah
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldJignesh Shah
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentJignesh Shah
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisJignesh Shah
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQLJignesh Shah
 
SFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQLSFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQLJignesh Shah
 
Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksJignesh Shah
 
OLTP Performance Benchmark Review
OLTP Performance Benchmark ReviewOLTP Performance Benchmark Review
OLTP Performance Benchmark ReviewJignesh Shah
 
Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsJignesh Shah
 

More from Jignesh Shah (11)

Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
 
Deep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseDeep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL Universe
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris Environment
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on Solaris
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQL
 
SFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQLSFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQL
 
Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW Locks
 
OLTP Performance Benchmark Review
OLTP Performance Benchmark ReviewOLTP Performance Benchmark Review
OLTP Performance Benchmark Review
 
Introduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System AdministratorsIntroduction to PostgreSQL for System Administrators
Introduction to PostgreSQL for System Administrators
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Best Practices of HA and Replication of PostgreSQL in Virtualized Environments

  • 1. Best Practices for HA and Replication for PostgreSQL in Virtualized Environments March 2013 Jignesh Shah & vPostgres Team @ VMware © 2010 VMware Inc. All rights reserved
  • 2. Agenda §  Enterprise needs §  Technologies readily available •  Virtualization Technologies for HA •  Replication modes of PostgreSQL (in core) §  Datacenter Deployment Blueprints •  HA within Datacenter, •  Read-Scaling within Datacenter •  DR/Read-Scaling across Datacenters 2
  • 3. Enterprise Needs for Mission Critical Databases 3
  • 4. Causes of Downtime §  Planned Downtime •  Software upgrade (OS patches, SQL Server cumulative updates) •  Hardware/BIOS upgrade §  Unplanned Downtime •  Datacenter failure (natural disasters, fire) •  Server failure (failed CPU, bad network card) •  I/O subsystem failure (disk failure, controller failure) •  Software/Data corruption (application bugs, OS binary corruptions) •  User Error (shutdown a SQL service, dropped a table) 4
  • 5. Enterprises need HA §  HA - High Availability of the Database Service •  Sustain Database Service failure if it goes down •  Sustain Physical Hardware Failures •  Sustain Data/Storage Failures •  100% Data Guarantee §  Goal •  Reduce Mean Time To Recover (MTTR) or Recovery Time Objective (RTO) •  Typically driven by SLAs 5
  • 6. Planning a High Availability Strategy §  Requirements •  Recovery Time Objective (RTO) •  What does 99.99% availability really mean? •  Recovery Point Objective (RPO) •  Zero data lost? •  HA vs. DR requirements §  Evaluating a technology •  What’s the cost for implementing the technology? •  What’s the complexity of implementing, and managing the technology? •  What’s the downtime potential? •  What’s the data loss exposure? Availability %   Downtime / Year   Downtime / Month *   Downtime / week   "Two Nines" - 99%   3.65 Days   7.2 Hours   1.69 Hours   "Three Nines" - 99.9%   8.76 Hours   43.2 Minutes   10.1 Minutes   "Four Nines" - 99.99%   52.56 Minutes   4.32 Minutes   1.01 Minutes   "Five Nines" - 99.999%   5.26 Minutes   25.9 Seconds   6.06 Seconds   * Using a 30 day month   6
  • 7. Enterprises need DR §  DR – Disaster Recovery for your site •  Overcome Complete Site Failure •  Closest if not 100% Data Guarantee expected •  Some data loss may be acceptable •  Key Metrics •  RTO – Recovery Time Objective •  Time to Recover the service •  RPO – Recovery Point Objective 7
  • 8. Enterprises also need Scale UP §  Scale UP – Throughput increases with more resources given in the same VM §  Though in reality limited by Amdahl’s law 8
  • 9. Enterprises also need Scale Out §  Scale Out – Throughput increases with more resources given via more nodes (VMs) §  Typically Shared Nothing architecture (few Shared ‘something’) §  Often results in “partitions” or “shards” 9
  • 10. Scale Out - For Reads §  Scale Out or Multi-Node Scaling for Reads §  Online retailer Use Case §  99% Reads and 1% Actual Write transactions 10
  • 11. Scale Out - For Writes §  Scale Out or Multi-nodes for Writes §  Example Use case: 24/7 Booking system §  Constant booking/changes/updates happening 11
  • 12. CAP Theorem §  Consistency •  all nodes see the same data at the same time §  Availability •  Guarantee that every request receives a response about whether it was successful or failed §  Partition Tolerance •  the system continues to operate despite arbitrary message loss or failure of part of the system 12
  • 15. VM Mobility §  Server Maintenance •  VMware vSphere® vMotion® and VMware vSphere Distributed Resource Scheduler (DRS) Maintenance Mode •  Migrate running VMs to other servers in the pool •  Automatically distribute workloads for optimal performance Key Benefits §  Storage Maintenance •  Eliminate downtime for common maintenance •  VMware vSphere® Storage vMotion •  No application or end user impact •  Migrate VM disks to other storage targets without disruption •  Freedom to perform maintenance whenever desired 15
  • 16. VMware vSphere High Availability (HA) §  Protection against host or operating system failure •  Automatic restart of virtual machines on any available host in cluster •  Provides simple and reliable first line of defense for all databases •  Minutes to restart •  OS and application independent, does not require complex configuration or expensive licenses 16
  • 17. App-Aware HA Through Health Monitoring APIs §  Leverage third-party solutions that integrate with VMware HA (for example, Symantec ApplicationHA) 1 Database Health Monitoring VMware HA •  Detect database service failures inside VM App Restart 3 2 2 APP APP Database Service Restart Inside VM OS OS •  App start / stop / restart inside VM 1 •  Automatic restart when app problem detected 3 Integration with VMware HA •  VMware HA automatically initiated when •  App restart fails inside VM •  Heartbeat from VM fails 17
  • 18. Simple, Reliable DR with VMware SRM §  Provide the simplest and most reliable disaster protection and site migration for all applications §  Provide cost-efficient replication of applications to failover site §  Simplify management of recovery and migration plans §  Replace manual run books with centralized recovery plans §  From weeks to minutes to set up new plan §  Automate failover and migration processes for reliable recovery §  Provide for fast, automated failover §  Enable non-disruptive testing §  Automate failback processes 18
  • 19. High Availability Options through Virtualization Technologies PostgreSQL Streaming Hardware Failure Tolerance Replication Continuous VMotion VMware FT Automated (Planned Downtime) Restart RedHat/OS Cluster VMware HA Unprotected 0% 10% 100% Application Coverage §  Clustering too complex and expensive for most applications §  VMware HA and FT provide simple, cost-effective availability §  VMotion provides continuous availability against planned downtime 19
  • 20. PostgreSQL Replication Modes 20
  • 21. PostgreSQL Replication §  Single master, multi-slave §  Cascading slave possible with vFabric Postgres 9.2 §  Mechanism based on WAL (Write-Ahead Logs) §  Multiple modes and multiple recovery ways •  Warm standby •  Asynchronous hot standby •  Synchronous hot standby §  Slaves can perform read operations optionally •  Good for read scale §  Node failover, reconnection possible 21
  • 22. File-based replication §  File-based recovery method using WAL archives §  Master node sends WAL files to archive once completed §  Slave node recovers those files automatically §  Some delay for the information recovered on slave •  Usable if application can lose some data •  Good performance, everything is scp/rsync/cp-based •  Timing when WAL file is sent can be controlled vPG ile slave 1 WAL file WAL f vPG master WAL Archive disk vPG slave 2 22
  • 23. Asynchronous replication §  WAL record-based replication §  Good balance performance/data loss •  Some delay possible for write-heavy applications •  Data loss possible if slaves not in complete sync due to delay §  Possible to connect a slave to a master or a slave (cascading mode) vPG Slave 1 Slave 1-1 master WAL shipping Slave 2 Slave 1-2 23
  • 24. Synchronous mode §  COMMIT-based replication •  Only one slave in sync with master •  Master waits that transaction COMMIT happens on sync slave, then commits §  No data loss based on transaction commit •  Performance impact •  Good for critical applications §  Cascading slaves are async async vPG Slave 1 Slave 1-1 master WAL shipping Slave 2 Slave 1-2 24
  • 25. HA operations: failover and node reconnection 25
  • 26. Node failover (1) §  Same procedure for all the replication modes vPG Slave master §  Failover procedure Promotion •  Connect to slave VM ssh postgres@$SLAVE_IP •  Promote the slave pg_ctl promote •  recovery.conf renamed to recovery.done in $PGDATA •  Former slave able to run write queries 26
  • 27. Node failover (2) §  Locate archive disk to a new slave node •  Recreate new virtual disk on new node •  Update restore_command in recovery.conf of the remaining slaves •  Update archive_command in postgresql.conf of promoted slave •  Copy WAL files from remaining archive disk to prevent SPOF after loss of master 27
  • 28. Node reconnection §  In case a previously failed node is up again old Promoted master Slave Reconnect §  Reconnection procedure •  Connect to old master VM ssh postgres@$MASTER_IP •  Create recovery.conf depending on recovery mode wanted recovery_target_timeline = ‘latest’ standby_mode = on restore_command = ’scp $SLAVE_IP:/archive/%f %p’ primary_conninfo = 'host=$SLAVE_IP application_name=$OLD_NAME’ •  Start node service postgresql start •  Important! Retrieving WAL is necessary for timeline switch 28
  • 29. Additional tips §  DB and server UI •  Usable as normal, cannot create objects on slave of course §  wal_level •  ‘archive’ for archive only recovery •  ‘hot_standby’ for read-queries on slaves §  pg_stat_replication to get status of connected slaves postgres=# SELECT pg_current_xlog_location(), application_name, sync_state, flush_location FROM pg_stat_replication; pg_current_xlog_location | application_name | sync_state | flush_location --------------------------+------------------+------------+---------------- 0/5000000 | slave2 | async | 0/5000000 0/5000000 | slave1 | sync | 0/5000000 (2 rows) 29
  • 30. Virtualized PostgreSQL Datacenter Deployment Blueprints 30
  • 31. Single Data Center Deployment Highly Available PostgreSQL database server with HA from virtualization environment DNS Name Applications Site 1 §  Easy to setup with one click HA §  Handles CPU/Memory hardware issues §  Requires Storage RAID 1 for storage protection (atleast) §  RTO in couple of minutes 31
  • 32. vSphere HA with PostgreSQL 9.2 Streaming Replication) §  Protection against HW/SW failures and DB corruption §  Storage flexibility (FC, iSCSI, NFS) §  Compatible w/ vMotion, DRS, HA §  RTO in few seconds §  vSphere HA + Streaming Replication •  Master generally restarted with vSphere HA •  When Master is unable to recover, the Replica can be promoted to master •  Reduces synchronization time after VM recovery 32
  • 33. Single Data Center Deployment Highly Available PostgreSQL database server with synchronous replication Virtual IP or DNS or pgPool or Applications pgBouncer Site 1 §  Synchronous Replication within Data Center §  Low Down Time (lower than HA) §  Automated Failover for hardware issues including Storage 33
  • 34. Multi-site Data Center Deployment Replication across Data Centers with PostgreSQL for Read Scaling/DR Applications Virtual IP or Site 2 pgPool or pgBouncer Site 1 §  Synchronous Replication within Data Center §  Asynchronous replication across data enters §  Read Scaling (Application Driver ) Site 3 34
  • 35. Multi-site Data Center Deployment Replication across Data Centers with Write Scaling (requires sharding) Applications Virtual IP or Site 2 pgPool or pgBouncer Site 1 §  Each Site has its own shard, its synchronous replica and asynchronous replicas of other sites §  Asynchronous replication across data enters Site 3 §  HA/DR built-in §  Sharding is application driven 35
  • 36. Hybrid Cloud Hybrid Cloud Scaling for Fluctuating Read peaks Virtual IP or pgPool or pgBouncer Applications Site 1 Cascaded Read Replicas §  Many times reads go up to 99% of workload §  (Example a sensational story that every one wants to read) §  Synchronous Replication within Data Center §  Asynchronous Replica slaves within Data Center and on Hybrid Clouds §  More replicas are spun up when load increases and discarded when it decreases 36
  • 37. Summary PostgreSQL 9.2 Future /Others •  Database Replication •  BiDirectional Replication •  Synchronous •  Asynchronous •  Slony/Londiste, etc •  Log Shipping Virtualization Platform Un-Planned downtime recovery Disaster recovery •  vSphere HA + AppAware HA •  Site Recovery Manager •  vSphere FT Planned downtime avoidance •  vMotion & Storage vMotion 37
  • 38. Your Feedback is Important! If interested, §  Drop your at end of session §  Email: jshah@vmware.com 38
  • 39. Thanks. Questions? Follow us on twitter: @vPostgres vFabric Blog: http://blogs.vmware.com/vfabric/postgres 39