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

Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Mydbops
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsMydbops
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explainedconfluent
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaJeff Holoman
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centersMariaDB plc
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for PostgresBeginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for PostgresEDB
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LMESet your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LMEconfluent
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)Gustavo Rene Antunez
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19cMaria Colgan
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance TuningRicardo Santos
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxwonyong hwang
 
PostgreSQL 11 New Features With Examples (English)
PostgreSQL 11 New Features With Examples (English)PostgreSQL 11 New Features With Examples (English)
PostgreSQL 11 New Features With Examples (English)Noriyoshi Shinoda
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3SANG WON PARK
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)Mydbops
 

What's hot (20)

Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
PostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability MethodsPostgreSQL Replication High Availability Methods
PostgreSQL Replication High Availability Methods
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for PostgresBeginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LMESet your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
Nginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptxNginx Reverse Proxy with Kafka.pptx
Nginx Reverse Proxy with Kafka.pptx
 
PostgreSQL 11 New Features With Examples (English)
PostgreSQL 11 New Features With Examples (English)PostgreSQL 11 New Features With Examples (English)
PostgreSQL 11 New Features With Examples (English)
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
 

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.
 
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
 
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 EnvironmentsJignesh Shah
 
Geographically Distributed PostgreSQL
Geographically Distributed PostgreSQLGeographically Distributed PostgreSQL
Geographically Distributed PostgreSQLmason_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 WorldJignesh Shah
 
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
 
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 database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationAlexey Lesovsky
 
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
 
PostgreSQL and Benchmarks
PostgreSQL and BenchmarksPostgreSQL and Benchmarks
PostgreSQL and BenchmarksJignesh Shah
 

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

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

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

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