SlideShare una empresa de Scribd logo
1 de 32
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
How to Design for Database
High Availability
Vibhor Kumar, Chief Performance Architect
Marc Linster, Senior Vice President of Product
Development
Bruce Momjian, Postgres Evangelist
1
Welcome – Housekeeping
Items
• Slides and recording will be available in next 48 hours
• Submit questions via GotoWebinar – will be answering at end
• We will be sharing info about EDB and Postgres later
2
Webinar Series
3
April 29 2020 My Favorite Postgres books
May 13 2020
Database Administration for
Postgres
June 3 2020
New Approaches to Integrating
Oracle and Postgres Database
Strategies
June 17 2020 How to Design for Database
High Availability
July 15 2020 Using the Postgres Tuning
Wizard in PEM
Every other Monday at
8:00 AM PDT/ 11:00 AM EDT
16:00 BST/ 17:00 CET
https://www.enterprisedb.com/postgres-pulse
Agenda
● Evolution of replication in Postgres
○ Streaming replication
○ Logical replication
● Replication for high availability
● Important high availability parameters
● Monitor high availability
● Patch the database with minimal downtime
● EDB Postgres Failover Manager (EFM)
● EDB tools to create a highly available Postgres architecture
4
High Availability
5
High Availability
High availability (HA) is a characteristic of a system, which aims to ensure an
agreed level of operational performance, usually uptime, for a higher than normal
period.
● Key Principles
○ Eliminate single point of failure
○ Reliable crossover
○ Detection of failures
6
● RPO – Recovery Point Objective
○ How much data can I lose?
○ Ex: RPO = 2 hours 🡺 In case of a crash
I may forget everything that I did in the
last 2 hours!
● RTO - Recovery Time Objective
○ How much time do I have to recover the
database after a crash?
○ Includes:
■ Load the initial backup
■ Play back the WAL files
Key Metrics for HA/DR
7
● MTTR - Mean Time to Recovery
○ On average – how long will RTO be
○ More WAL files to re-play if the last full backup was a
long time ago
● GRO – Geographic Recovery Objective
○ If my datacenter becomes unavailable, how long will
it take for the service to become available again?
● Maintenance Windows
○ How many hours of planned maintenance per year?
Evolution of Replication in Postgres
8
PostgreSQL 7.x (~2000)
● Replication should not be part of
core Postgres
● Londiste – Slony (trigger based
logical replication)
PostgreSQL 8.0 (~2005)
● Point-In-Time Recovery (WAL)
PostgreSQL 9.4 (~2014)
● Logical Decoding (changeset
extraction)
PostgreSQL 9.0 (~2010)
● Streaming Replication (physical)
PostgreSQL 8.2 (~2006)
● Warm Standby
● EFM for
High Availability
9
Eliminate Single Point of Failure
Eliminate Single Point of
Failure
● WAL shipping based replication
○ Replication based on the archived WAL
● Streaming replication (SR)
○ Streaming WAL files to one or more standbys
● Logical replication
○ Streaming logical data modifications from the WAL.
10
Hot Standby
● Identical to primary system
○ Data is still mirrored in real time
○ Allows READ
○ On failure, can replace primary
● Approaches
○ WAL shipping based
○ Streaming WAL (widely used after 9.0)
11
Hot Standby: WAL Shipping
12
Monitor: WAL Shipping
● Functions on standby
○ pg_is_in_recovery()
○ pg_last_xlog/wal_replay_location/lsn()
○ pg_last_xact_replay_timestamp()
13
Hot standby: Streaming WAL
14
Streaming Replication
● Asynchronous Streaming Replication
● Synchronous Streaming Replication
○ synchronous_standby_names
■ e.g.
■ FIRST 1 (standby_east, standby_west)
■ ANY 3 (standby_east, standby_west, eu_standby_east,
eu_standby_west)
■ 'standby_east, standby_west'
○ synchronous_commit - off/local/remote_write/on/remote_apply
15
Monitor: Streaming Replication
● Views
○ Master: pg_stat_replication
○ Standby: pg_wal_receiver
16
High Availability
17
Reliable Crossover & Detection
18
EDB POSTGRES FAILOVER
MANAGER (EFM)
Protect Your Mission
Critical Applications
from Costly Outages
High Availability
Infrastructure for
EDB Postgres Clusters
Ensure Data Remains
Available in the
Event of a Failure
ELIMINATE SINGLE
POINTS OF FAILURE
DETECTS AND
AUTOMATES FAILOVER
PEACE OF MIND FAILOVER
WILL BE INITIATED
19
Streaming
Replication &
EFM
High Availability
20
Software Updates/Patching
Software Updates: Postgres H.A.
cluster
● Three reasons for software updates
○ Remedy known software issues
○ General stability and reliability of the software
○ Security problem
21
Software Updates: Strategies
● Three strategies
○ All Nodes Patching
○ Rolling Patching
○ Minimum Downtime Patching
22
High Availability
23
Postgres H.A Architecture
USE CASE - Architecture
24
Highly Available Postgres Cluster with Automatic Failover, Backups and Monitoring enabled
High Availability & Resiliency
• Master & Replica spread across
• Failover to most recent standby
• Reconfigure remaining standby to the new
master
• Allow switching the roles of Master-standby
Monitoring, Alerting & Tuning
• Monitor multiple database servers with intuitive
dashboards, email, SNMP alerts, and rich APIs
• Alerts on load, bloat, memory utilization,
server/agent down
• Track slow queries, analyze and tune it
Backup & Recovery
• Fast Backups and trouble free Disaster Recovery
Architecture
Conclusion
● High Availability components
○ Hot Standby (Streaming Replication)
○ EDB Postgres Failover Manager
○ Postgres Enterprise Manager
● Design consideration
○ Near zero downtime software maintenance
○ RPO/RTO/GRO
25
Resources
Blog series
● What Does High Availability Really Mean
● Patching Minor Version in Postgres High Availability (HA) Database Cluster
● Plans & Strategies for DBAs
● Key Parameters and Configuration for Streaming Replication in Postgres 12
● Quick and Reliable Failure Detection with EDB Postgres Failover Manager
26
ONLY OPEN
SOURCE BASED
RDBMS IN
GARTNER MQ
EDB Recognized 7 Years
In A Row on Gartner’s
Magic Quadrant
27
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2020. All rights reserved.
28
Customers working SMARTER, reducing RISK and being more PRODUCTIVE with EDB.
OVER 4,000 CUSTOMERS
U.S Customers
EMEA Customers APAC Customers
102
of the Fortune
500
337
of the Forbes
Global 2000
EDB OPEN SOURCE LEADERSHIP
NAMED EDB OPEN SOURCE COMMITTERS AND CONTRIBUTORS
29
● CORE TEAM
● ● ●
● MAJOR CONTRIBUTORS ● CONTRIBUTORS
Akshay
Joshi
Amul
Sul
Ashesh
Vashi
Dilip
Kumar
Jeevan
Ladhe
Mithun
Cy
Devrim
Gündüz
Amit
Kapila
Bruce
Momjian
Dave
Page
Robert
Haas
Ashutosh
Sharma
Rushabh
Lathia
- designates committers
30
EDB Postgres Database
24/7 Global Support
Professional Services Postgres Contributions
Tools & Innovation Security/performance
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.32
THANK YOU
info@enterprisedb.com
www.enterprisedb.com

Más contenido relacionado

La actualidad más candente

PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolEDB
 
Installing Postgres on Linux
Installing Postgres on LinuxInstalling Postgres on Linux
Installing Postgres on LinuxEDB
 
Automating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with AnsibleAutomating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with AnsibleEDB
 
Database Dumps and Backups
Database Dumps and BackupsDatabase Dumps and Backups
Database Dumps and BackupsEDB
 
The Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data CenterThe Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data CenterEDB
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxEDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleEDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for PostgresEDB
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLEDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for PostgresEDB
 
Making your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly AvailableMaking your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly AvailableEDB
 
Automating Postgres Deployments on AWS and VMware, with Terraform and Ansible
Automating Postgres Deployments on AWS and VMware, with Terraform and AnsibleAutomating Postgres Deployments on AWS and VMware, with Terraform and Ansible
Automating Postgres Deployments on AWS and VMware, with Terraform and AnsibleEDB
 
Remote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needsRemote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needsEDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...EDB
 
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres DayPostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres DayEDB
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres EDB
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project ExperienceEDB
 
EDB Failover Manager - Features and Demo
EDB Failover Manager - Features and DemoEDB Failover Manager - Features and Demo
EDB Failover Manager - Features and DemoEDB
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAPEDB
 

La actualidad más candente (20)

PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
 
Installing Postgres on Linux
Installing Postgres on LinuxInstalling Postgres on Linux
Installing Postgres on Linux
 
Automating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with AnsibleAutomating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with Ansible
 
Database Dumps and Backups
Database Dumps and BackupsDatabase Dumps and Backups
Database Dumps and Backups
 
The Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data CenterThe Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data Center
 
Why you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on LinuxWhy you should use native packages to install PostgreSQL on Linux
Why you should use native packages to install PostgreSQL on Linux
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
 
Making your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly AvailableMaking your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly Available
 
Automating Postgres Deployments on AWS and VMware, with Terraform and Ansible
Automating Postgres Deployments on AWS and VMware, with Terraform and AnsibleAutomating Postgres Deployments on AWS and VMware, with Terraform and Ansible
Automating Postgres Deployments on AWS and VMware, with Terraform and Ansible
 
Remote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needsRemote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needs
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres DayPostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
 
EDB Failover Manager - Features and Demo
EDB Failover Manager - Features and DemoEDB Failover Manager - Features and Demo
EDB Failover Manager - Features and Demo
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
 

Similar a How to Design for Database High Availability

Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesDoKC
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3LibbySchulze
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsHPCC Systems
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the CloudMike Fowler
 
Designing for operability and managability
Designing for operability and managabilityDesigning for operability and managability
Designing for operability and managabilityGaurav Bahrani
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASAshnikbiz
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSVMware Tanzu
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSCarlos Andrés García
 
Running MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWSRunning MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWSMongoDB
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific DashboardCeph Community
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
Save money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinuxSave money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinuxEDB
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the fieldJoAnna Cheshire
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Ashnikbiz
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
 
PostgreSQL 10: What to Look For
PostgreSQL 10: What to Look ForPostgreSQL 10: What to Look For
PostgreSQL 10: What to Look ForAmit Langote
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdfsreedb2
 
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
 

Similar a How to Design for Database High Availability (20)

Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC Systems
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout Session
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the Cloud
 
Designing for operability and managability
Designing for operability and managabilityDesigning for operability and managability
Designing for operability and managability
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
 
Running MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWSRunning MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWS
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
Save money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinuxSave money with Postgres on IBM PowerLinux
Save money with Postgres on IBM PowerLinux
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout Session
 
PostgreSQL 10: What to Look For
PostgreSQL 10: What to Look ForPostgreSQL 10: What to Look For
PostgreSQL 10: What to Look For
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
 
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
 

Más de EDB

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSEDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenEDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLEDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLEDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLEDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLEDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresEDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINEDB
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQLEDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLEDB
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesEDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoEDB
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLEDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJEDB
 

Más de EDB (20)

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
 

Último

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Último (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

How to Design for Database High Availability

  • 1. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. How to Design for Database High Availability Vibhor Kumar, Chief Performance Architect Marc Linster, Senior Vice President of Product Development Bruce Momjian, Postgres Evangelist 1
  • 2. Welcome – Housekeeping Items • Slides and recording will be available in next 48 hours • Submit questions via GotoWebinar – will be answering at end • We will be sharing info about EDB and Postgres later 2
  • 3. Webinar Series 3 April 29 2020 My Favorite Postgres books May 13 2020 Database Administration for Postgres June 3 2020 New Approaches to Integrating Oracle and Postgres Database Strategies June 17 2020 How to Design for Database High Availability July 15 2020 Using the Postgres Tuning Wizard in PEM Every other Monday at 8:00 AM PDT/ 11:00 AM EDT 16:00 BST/ 17:00 CET https://www.enterprisedb.com/postgres-pulse
  • 4. Agenda ● Evolution of replication in Postgres ○ Streaming replication ○ Logical replication ● Replication for high availability ● Important high availability parameters ● Monitor high availability ● Patch the database with minimal downtime ● EDB Postgres Failover Manager (EFM) ● EDB tools to create a highly available Postgres architecture 4
  • 6. High Availability High availability (HA) is a characteristic of a system, which aims to ensure an agreed level of operational performance, usually uptime, for a higher than normal period. ● Key Principles ○ Eliminate single point of failure ○ Reliable crossover ○ Detection of failures 6
  • 7. ● RPO – Recovery Point Objective ○ How much data can I lose? ○ Ex: RPO = 2 hours 🡺 In case of a crash I may forget everything that I did in the last 2 hours! ● RTO - Recovery Time Objective ○ How much time do I have to recover the database after a crash? ○ Includes: ■ Load the initial backup ■ Play back the WAL files Key Metrics for HA/DR 7 ● MTTR - Mean Time to Recovery ○ On average – how long will RTO be ○ More WAL files to re-play if the last full backup was a long time ago ● GRO – Geographic Recovery Objective ○ If my datacenter becomes unavailable, how long will it take for the service to become available again? ● Maintenance Windows ○ How many hours of planned maintenance per year?
  • 8. Evolution of Replication in Postgres 8 PostgreSQL 7.x (~2000) ● Replication should not be part of core Postgres ● Londiste – Slony (trigger based logical replication) PostgreSQL 8.0 (~2005) ● Point-In-Time Recovery (WAL) PostgreSQL 9.4 (~2014) ● Logical Decoding (changeset extraction) PostgreSQL 9.0 (~2010) ● Streaming Replication (physical) PostgreSQL 8.2 (~2006) ● Warm Standby ● EFM for
  • 10. Eliminate Single Point of Failure ● WAL shipping based replication ○ Replication based on the archived WAL ● Streaming replication (SR) ○ Streaming WAL files to one or more standbys ● Logical replication ○ Streaming logical data modifications from the WAL. 10
  • 11. Hot Standby ● Identical to primary system ○ Data is still mirrored in real time ○ Allows READ ○ On failure, can replace primary ● Approaches ○ WAL shipping based ○ Streaming WAL (widely used after 9.0) 11
  • 12. Hot Standby: WAL Shipping 12
  • 13. Monitor: WAL Shipping ● Functions on standby ○ pg_is_in_recovery() ○ pg_last_xlog/wal_replay_location/lsn() ○ pg_last_xact_replay_timestamp() 13
  • 15. Streaming Replication ● Asynchronous Streaming Replication ● Synchronous Streaming Replication ○ synchronous_standby_names ■ e.g. ■ FIRST 1 (standby_east, standby_west) ■ ANY 3 (standby_east, standby_west, eu_standby_east, eu_standby_west) ■ 'standby_east, standby_west' ○ synchronous_commit - off/local/remote_write/on/remote_apply 15
  • 16. Monitor: Streaming Replication ● Views ○ Master: pg_stat_replication ○ Standby: pg_wal_receiver 16
  • 18. 18 EDB POSTGRES FAILOVER MANAGER (EFM) Protect Your Mission Critical Applications from Costly Outages High Availability Infrastructure for EDB Postgres Clusters Ensure Data Remains Available in the Event of a Failure ELIMINATE SINGLE POINTS OF FAILURE DETECTS AND AUTOMATES FAILOVER PEACE OF MIND FAILOVER WILL BE INITIATED
  • 21. Software Updates: Postgres H.A. cluster ● Three reasons for software updates ○ Remedy known software issues ○ General stability and reliability of the software ○ Security problem 21
  • 22. Software Updates: Strategies ● Three strategies ○ All Nodes Patching ○ Rolling Patching ○ Minimum Downtime Patching 22
  • 24. USE CASE - Architecture 24 Highly Available Postgres Cluster with Automatic Failover, Backups and Monitoring enabled High Availability & Resiliency • Master & Replica spread across • Failover to most recent standby • Reconfigure remaining standby to the new master • Allow switching the roles of Master-standby Monitoring, Alerting & Tuning • Monitor multiple database servers with intuitive dashboards, email, SNMP alerts, and rich APIs • Alerts on load, bloat, memory utilization, server/agent down • Track slow queries, analyze and tune it Backup & Recovery • Fast Backups and trouble free Disaster Recovery Architecture
  • 25. Conclusion ● High Availability components ○ Hot Standby (Streaming Replication) ○ EDB Postgres Failover Manager ○ Postgres Enterprise Manager ● Design consideration ○ Near zero downtime software maintenance ○ RPO/RTO/GRO 25
  • 26. Resources Blog series ● What Does High Availability Really Mean ● Patching Minor Version in Postgres High Availability (HA) Database Cluster ● Plans & Strategies for DBAs ● Key Parameters and Configuration for Streaming Replication in Postgres 12 ● Quick and Reliable Failure Detection with EDB Postgres Failover Manager 26
  • 27. ONLY OPEN SOURCE BASED RDBMS IN GARTNER MQ EDB Recognized 7 Years In A Row on Gartner’s Magic Quadrant 27 CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2020. All rights reserved.
  • 28. 28 Customers working SMARTER, reducing RISK and being more PRODUCTIVE with EDB. OVER 4,000 CUSTOMERS U.S Customers EMEA Customers APAC Customers 102 of the Fortune 500 337 of the Forbes Global 2000
  • 29. EDB OPEN SOURCE LEADERSHIP NAMED EDB OPEN SOURCE COMMITTERS AND CONTRIBUTORS 29 ● CORE TEAM ● ● ● ● MAJOR CONTRIBUTORS ● CONTRIBUTORS Akshay Joshi Amul Sul Ashesh Vashi Dilip Kumar Jeevan Ladhe Mithun Cy Devrim Gündüz Amit Kapila Bruce Momjian Dave Page Robert Haas Ashutosh Sharma Rushabh Lathia - designates committers
  • 30. 30 EDB Postgres Database 24/7 Global Support Professional Services Postgres Contributions Tools & Innovation Security/performance
  • 31.
  • 32. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.32 THANK YOU info@enterprisedb.com www.enterprisedb.com