SlideShare a Scribd company logo
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

MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
Frederic Descamps
 
Best Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual EnvironmentsBest Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual Environments
Jignesh Shah
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
Kenny Gryp
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
PGConf APAC
 
MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼
NeoClova
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
YoungHeon (Roy) Kim
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
haroonm
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
PostgreSQL-Consulting
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
Mayank Prasad
 
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
NAVER D2
 
Automated master failover
Automated master failoverAutomated master failover
Automated master failover
Yoshinori Matsunobu
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
Kenny Gryp
 
MySQL Document Store를 활용한 NoSQL 개발
MySQL Document Store를 활용한 NoSQL 개발MySQL Document Store를 활용한 NoSQL 개발
MySQL Document Store를 활용한 NoSQL 개발
Oracle Korea
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
NeoClova
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
satejsahu
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Databricks
 
Introducing Change Data Capture with Debezium
Introducing Change Data Capture with DebeziumIntroducing Change Data Capture with Debezium
Introducing Change Data Capture with Debezium
ChengKuan Gan
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
NeoClova
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
NeoClova
 
Logical Replication in PostgreSQL
Logical Replication in PostgreSQLLogical Replication in PostgreSQL
Logical Replication in PostgreSQL
EDB
 

What's hot (20)

MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
Best Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual EnvironmentsBest Practices of running PostgreSQL in Virtual Environments
Best Practices of running PostgreSQL in Virtual Environments
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
 
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
 
Automated master failover
Automated master failoverAutomated master failover
Automated master failover
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
MySQL Document Store를 활용한 NoSQL 개발
MySQL Document Store를 활용한 NoSQL 개발MySQL Document Store를 활용한 NoSQL 개발
MySQL Document Store를 활용한 NoSQL 개발
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
 
Introducing Change Data Capture with Debezium
Introducing Change Data Capture with DebeziumIntroducing Change Data Capture with Debezium
Introducing Change Data Capture with Debezium
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
 
Logical Replication in PostgreSQL
Logical Replication in PostgreSQLLogical Replication in PostgreSQL
Logical Replication in PostgreSQL
 

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 - SCALE
PostgreSQL Experts, Inc.
 
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
Ashnikbiz
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
Zalando Technology
 
5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance5 Steps to PostgreSQL Performance
5 Steps to PostgreSQL Performance
Command Prompt., Inc
 
Geographically Distributed PostgreSQL
Geographically Distributed PostgreSQLGeographically Distributed PostgreSQL
Geographically Distributed PostgreSQL
mason_s
 
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
Jignesh Shah
 
Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
EDB
 
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
EDB
 
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
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
Alexey 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 Analytics
mason_s
 
Postgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster SuitePostgres & Red Hat Cluster Suite
Postgres & Red Hat Cluster Suite
EDB
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
Jignesh 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
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
EDB
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
Federico Campoli
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
Alexey Lesovsky
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
John Paulett
 
PostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/SwitchbackPostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/Switchback
Vibhor 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 2015
Alexey Lesovsky
 

Viewers also liked (20)

PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
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
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
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
 
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
 
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
 
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
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
 
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
 

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 101
VMworld
 
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
Tanawit 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 server
Eduardo Castro
 
Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5Zerto Virtual Replication 4.5
Zerto Virtual Replication 4.5
BusinesstoVirtual
 
Top Ten Private Cloud Risks
Top Ten Private Cloud RisksTop Ten Private Cloud Risks
Top Ten Private Cloud Risks
Symantec
 
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
VMworld
 
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 Recovery
MarkTaylorIBM
 
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
solarisyourep
 
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
HostedbyConfluent
 
Virtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric VanderburgVirtualization for competitive advantage - Eric Vanderburg
Virtualization for competitive advantage - Eric Vanderburg
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?
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 Center
VMworld
 
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
Tokyo 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 databases
SolarWinds
 
Self-Driving Storage and Applications Integration
Self-Driving Storage and Applications IntegrationSelf-Driving Storage and Applications Integration
Self-Driving Storage and Applications Integration
MarketingArrowECS_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 Data
Jignesh Shah
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
Jignesh Shah
 
Deep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL UniverseDeep Dive into RDS PostgreSQL Universe
Deep Dive into RDS PostgreSQL Universe
Jignesh 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 World
Jignesh Shah
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
Jignesh Shah
 
Tuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris EnvironmentTuning DB2 in a Solaris Environment
Tuning DB2 in a Solaris Environment
Jignesh Shah
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on Solaris
Jignesh Shah
 
My experience with embedding PostgreSQL
 My experience with embedding PostgreSQL My experience with embedding PostgreSQL
My experience with embedding PostgreSQL
Jignesh Shah
 
SFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQLSFPUG - DVDStore Performance Benchmark and PostgreSQL
SFPUG - DVDStore Performance Benchmark and PostgreSQL
Jignesh 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 (12)

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
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and Benchmarks
 
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

GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

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