More Related Content Similar to An overview of reference architectures for Postgres (20) An overview of reference architectures for Postgres2. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.2
• Slides and recording will be available in next 48 hours
• Submit questions via Zoom – will be answering at end
• We will be sharing info about EDB and Postgres later
Welcome – Housekeeping Items
3. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.3
Agenda
• Introduction to EDB
• What are reference architectures?
• Architecture properties
• Core Architectures
• Add-on architectures:
• Pooling & Load Balancing/Query Routing
• Management
• Summary
• Q&A
4. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.4
• Enterprise PostgreSQL and Open Source innovations
• 5,000+ global customers
• Recognized by Gartner Magic Quadrant for 7 years in a row
• One of the only sub-$1bn revenue companies
• Recently acquired 2ndQuadrant, making us the largest
dedicated PostgreSQL company in the world with over 500
employees
• PostgreSQL community leadership, employing over 25
committers and recognised contributors
2019
Challengers Leaders
Niche Players Visionaries
Abilitytoexecute
Completeness of vision
1986
The Design
of PostgreSQL
1996
Birth of
PostgreSQL
2004
EDB
is founded
2020
TodayMaterialized
Views
Parallel
Query
JIT
Compilation
Heap Only
Tuples (HOT)
Serializable
Parallel Query
We’re database fanatics who care
deeply about PostgreSQL
Expertise
5. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.5
• A set of pre-designed tried-and-test deployment patterns for PostgreSQL
• Intended as a starting point:
• Easy to try out
• Can be used as-is
• Can be used as a foundation
• Core architectures for the database server
• Add-on architectures provide additional capabilities
What are Reference Architectures?
6. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.6
Architecture Properties
Recovery Time Objective (RTO)
"The Recovery Time Objective (RTO) is the targeted duration of time and a service level within
which a business process must be restored after a disaster (or disruption) in order to avoid
unacceptable consequences associated with a break in business continuity."
https://en.wikipedia.org/wiki/Disaster_recovery#Recovery_Time_Objective
7. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.7
Architecture Properties
Recovery Point Objective (RPO)
"A Recovery Point Objective (RPO) is defined by business continuity planning. It is the maximum
targeted period in which data (transactions) might be lost from an IT service due to a major
incident.
If RPO is measured in minutes (or even a few hours), then in practice, off-site mirrored backups
must be continuously maintained; a daily off-site backup on tape will not suffice."
https://en.wikipedia.org/wiki/Disaster_recovery#Recovery_Point_Objective
8. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.8
Architecture Properties
Geographic Redundancy Objective (GRO)
"... sometimes considered the disaster recovery requirement. This objective encompasses what
data needs to be replicated off site, how often and how far."
https://storageswiss.com/2014/01/22/backup-basics-what-do-slo-rpo-rto-vro-and-gro-
mean/#:~:text=Geographic%20Redundancy%20Objective&text=Simply%20put%2C%20users%20are%20more,multiple
%20geographic%20requirements%20per%20application.
9. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.9
Architecture Properties
Target Availability
"The degree to which a system, subsystem or equipment is in a specified operable and
committable state at the start of a mission, when the mission is called for at an unknown, i.e. a
random, time."
"Normally high availability systems might be specified as 99.98%, 99.999% or 99.9996%."
https://en.wikipedia.org/wiki/Availability
10. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.10
Architecture Properties
A note on Target Availability
• A target is NOT a guarantee!
• Availability is affected by more than just the software application:
• Operating system
• Hardware
• Network
• Environment (power, cooling etc)
• Upgrades/maintenance
• Quoted maximum target availabilities apply to EDB software maintenance only!
Availability Max downtime/year
99% 3d, 15h, 39m, 29s
99.9% 8h, 45m, 56s
99.99% 52m, 35s
99.999% 5m, 15s
99.9999% 31s
11. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.11
Core Architectures
Database servers
• Single Node
• Multi-node cluster with asynchronous replication
• Multi-node cluster with synchronous replication
12. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.12
• The most basic deployment
• A single PostgreSQL server for development/testing
• Not generally recommended for production applications
Single Node
Property Description
Recovery Time Objective Dependent on database size and backup strategy
Recovery Point Objective Dependent on backup strategy
Geographic Redundancy Objective N/A
Target Availability 99.9%
14. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.14
• Primary server with one or more "hot" standby servers
• Suitable for production environments with high availability and read scaling
• Write performant, but un-replicated transactions may be lost during failover
Multi node with asynchronous replication
Property Description
Recovery Time Objective < 60 seconds
Recovery Point Objective Typically a few seconds or less during failover (un-replicated transactions may be
lost). Dependent on backup strategy for full recovery.
Geographic Redundancy Objective Dependent on node placement. Typically multi-availability zone.
Target Availability 99.99% (99.999% may be possible with failover tuning)
16. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.16
• Primary server with one or more "hot" standby servers
• Suitable for production environments with high availability and read scaling
• Less write performant, but no loss of committed transactions during failover
Multi node with synchronous replication
Property Description
Recovery Time Objective < 60 seconds
Recovery Point Objective Typically a few seconds or less during failover, with no loss of committed
transactions. Dependent on backup strategy for full recovery.
Geographic Redundancy Objective Dependent on node placement. Typically multi-availability zone.
Target Availability 99.99% (99.999% may be possible with failover tuning)
18. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.18
Add-on Architectures
Pooling & Load Balancing/Query Routing
• pgBouncer
• pgPool
19. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.19
• Connection pooling to minimise connections to PostgreSQL and reduce
connection startup time
• Load balancing over hot standby servers for read-only connections:
• The application must be able to separate read and read/write
connections
• Supports Windows as well as Linux
Load balancing with pgBouncer
21. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.21
• Connection pooling to minimise connections to PostgreSQL and reduce
connection startup time
• Load balancing over hot standby servers for read-only connections
• Query routing for read-only vs. read-write transactions:
• Use with great care!
• Views, triggers and functions/procedures may mask write activity
Load balancing and query routing with pgPool
23. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.23
Add-on Architectures
Management
• Monitoring with Postgres Enterprise Manager (PEM)
• Backup & Recovery with Backup and Recovery Tool
(BART)
24. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.24
• Use when you have one or more PostgreSQL instances or clusters that you wish to monitor
and manage.
• PEM provides 24x7 monitoring and alerting, and tools for managing your database server,
including all functionality found in pgAdmin:
• Pre-built and self-built dashboards
• Capacity management predictive reporting
• Wait state performance analysis with EDB Postgres Advanced Server
• SQL profiling
• Tuning, logging, and audit logging wizards
• Static deployment analysis and recommendations
Monitoring & Management with Postgres
Enterprise Manager (PEM)
26. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.26
• Use when you have one or more PostgreSQL instances or clusters that you need to
backup for disaster recovery purposes.
• May be required to meet recovery time objectives.
• Backups can be full restores (i.e. the database cluster is restored in its entirety), or
Point In Time Recovery (PITR) may be used to restore the cluster to the state it was
in at a specific point in time.
• May be required to meet recovery point objects
• Can be managed with Postgres Enterprise Manager.
Backup & Recovery with Backup and Recovery Tool
(BART)
28. © Copyright EnterpriseDB Corporation, 2020. All rights reserved.28
Conclusion
Easy to use deployment patterns for PostgreSQL
EDB Reference Architectures make it easy to get your PostgreSQL
deployments up and running in battle-hardened configurations
• EDB Reference Architectures on Github
Upcoming webinar on 11 November 2020:
Automating a Postgres high availability architecture with Ansible
Thank You