availability of postgresql in the datacenter - postgresql wiki
TRANSCRIPT
![Page 1: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/1.jpg)
USE IMPROVE EVANGELIZE
Availability of PostgreSQL in the Datacenter●Detlef Ulherr●Sun Microsystems●
![Page 2: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/2.jpg)
2
USE IMPROVE EVANGELIZE
Outline
● Increasing the availability of PostgreSQL● Why is High Availability Important?● What is “Open High Availability Cluster”?● How Solaris Cluster Provides High
Availability● Cluster Agents● PostgreSQL and Open HA Cluster● Cluster in Action
![Page 3: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/3.jpg)
3
USE IMPROVE EVANGELIZE
Increasing the Availability of PostgreSQL
![Page 4: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/4.jpg)
4
USE IMPROVE EVANGELIZE
PostgreSQL availability with Solaris
● Use the features in Solaris 10 / Nevada● Use the shared disk approach (Sun Cluster /
Open HA Cluster), shared nothing available as well
● Configure a warm standby with pg_standby● Use master slave replication with Slony-I● Combine the replication with shared disk● If you need desaster recovery, use Sun
Cluster Geo /Open Ha Geo
![Page 5: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/5.jpg)
5
USE IMPROVE EVANGELIZE
Solaris Features for more PostgreSQL Availability
![Page 6: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/6.jpg)
6
USE IMPROVE EVANGELIZE
Solaris 10 availability features
● Service Management Facility (SMF)● Offers process monitoring
● IP Multipathing (IPMP)● Protects from network adapter failures
● Isolation with Containers● Separate multiple PostgreSQL installations
![Page 7: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/7.jpg)
7
USE IMPROVE EVANGELIZE
Why Is High Availability Important?
![Page 8: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/8.jpg)
8
USE IMPROVE EVANGELIZE
Why is HA Important?
● Downtime is costly● Failures are inevitable– Hardware, Software, Human Error, Disaster– Automated recovery the goal
● With a single physical system, single points of failure are catastrophic– Network card dies, CPU misbehaves, Disk
drive crashes ...
HA Clusters and Solaris automate the recovery process from inevitable failures, minimizing downtime and cost
![Page 9: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/9.jpg)
9
USE IMPROVE EVANGELIZE
What is Open High Availability Cluster?
![Page 10: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/10.jpg)
10
USE IMPROVE EVANGELIZE
Open High Availability Cluster
● The open-source code base for SolarisTM Cluster– Based on Solaris Cluster 3.2
● Hosted by the HA Clusters community group on opensolaris.org– http://www.opensolaris.org/os/community/ha-
clusters/ohac/
● Code available under the CDDL
![Page 11: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/11.jpg)
11
USE IMPROVE EVANGELIZE
How Solaris Cluster Provides High Availability
![Page 12: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/12.jpg)
12
USE IMPROVE EVANGELIZE
Platform for High Availability● Tolerates Single Points of Failure (and some double
failures)● Hardware redundancy with off-the-shelf hardware● Robust software HA infrastructure– Monitors the health of cluster infrastructure (hosts, shared storage,
and network)
– Orchestrates recovery of applications and cluster infrastructure (shared storage and IP networking)
– Integrated tightly with Solaris Operating System
– Robust membership including quorum to prevent partitions
– Disk Fencing ensures Data Integrity in spite of failures
![Page 13: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/13.jpg)
13
USE IMPROVE EVANGELIZE
Solaris Cluster Stack
OperatingSystem
Cluster Infrastructure
Agents
Applications
Heartbeats
Membership
![Page 14: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/14.jpg)
14
USE IMPROVE EVANGELIZE
●HA Failover Service● Application failover
● Within nodes or container● Containers failover● Failover IP address
Failover Service
![Page 15: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/15.jpg)
15
USE IMPROVE EVANGELIZE
Scalable ServiceSoftware Load Balancing
Global Network Service Provides Global IP address
with failure protection
Scalable Service
![Page 16: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/16.jpg)
16
USE IMPROVE EVANGELIZE
Apache (Scalable)
Global Network Service Provides Global IP address
with failure protection
PostgreSQL (Failover)
Example: Apache and PostgreSQL
![Page 17: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/17.jpg)
17
USE IMPROVE EVANGELIZE
Heartbeats
Membership
Quorum
Disk Fencing ●Resource Group Manager● Resource (application) dependencies● Inter RG dependencies● RG affinities
●HA Failover Service● Application failover
● Within nodes or container● Containers failover● Failover IP address
Global File ServiceFailover File service
Scalable ServiceSoftware Load Balancing
Global Network Service Provides Global IP address
with failure protection
Mon
itorin
g
Solaris Cluster Architecture
![Page 18: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/18.jpg)
18
USE IMPROVE EVANGELIZE
Cluster Agents
![Page 19: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/19.jpg)
19
USE IMPROVE EVANGELIZE
Solaris Cluster Stack
OperatingSystem
Cluster Infrastructure
Agents
Applications
![Page 20: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/20.jpg)
20
USE IMPROVE EVANGELIZE
Cluster Agents (Data Services)
● Applications run on cluster unmodified (off-the-shelf)● Cluster Agents are the “glue” layer between applications
and cluster infrastructure– Custom agent for each application
Interacts with cluster core through APIs Provides start, stop, and other commands specific to the application
to be called by the cluster framework Provides monitor daemon specific to the application
● Application cannot break into the high availability business on Solaris Cluster without an agent!
![Page 21: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/21.jpg)
21
USE IMPROVE EVANGELIZE
Agents Development
Several choices available● Sun Cluster Agent Builder– Generic Data Service (GDS)
– Data Service Development Library (DSDL)
– RGM Application Programming Interface (API)
● Advanced GDS Template available from OHAC
![Page 22: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/22.jpg)
22
USE IMPROVE EVANGELIZE
PostgreSQL and Open Ha Cluster
![Page 23: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/23.jpg)
23
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Disk) Global Zone
PostgreSQL
Storage Log. Host
Application
Node1 Node2
![Page 24: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/24.jpg)
24
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Disk) Global Zone
Node1 Node2
Storage based replicationTruecopy (3.2)SRDF (3.2U1)
PostgreSQL
Storage Log. Host
Application
![Page 25: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/25.jpg)
25
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Disk) Local Zone
Node1 : Zone1 Node2 : Zone2
PostgreSQL
Storage Log. Host
Application
![Page 26: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/26.jpg)
26
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Disk) Failover Zone
PostgreSQL
Storage Log. Host
Node1 Node2
Zone1
Application
![Page 27: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/27.jpg)
27
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Nothing) Global Zone (near future)
Node2 StandbyNode1 Primary
Quorum Server
PostgreSQL-P PostgreSQL-SWAL file shipping
Rolechanger
Log. Host
Application
![Page 28: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/28.jpg)
28
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Nothing) Local Zone (near future)
Rolechanger
Log. Host
Application
Node2 : Zone2 Standby
Node1 : Zone 1 Primary
Quorum Server
PostgreSQL-P PostgreSQL-SWAL file shipping
![Page 29: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/29.jpg)
29
USE IMPROVE EVANGELIZE
PostgreSQL (Shared Disk) Multiple Clusters (near future)
PostgreSQL
Storage Log. Host
Node1 (Zone) Node2 (Zone)
PostgreSQL
Storage Log. Host
Node3 (Zone) Node4 (Zone)
WAL file shipping
Cluster 1 Cluster 2
![Page 30: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/30.jpg)
30
USE IMPROVE EVANGELIZE
Geographic ClusteringMulti-Cluster and Multi-Site capability
Site 1
Admin.Client
UserClient
Site 2
Optional heartbeat networks
Optional storage network
IP NetInter/Intra
Dial,Sat Net, etc.
ClusterCluster
Storage NetStorage Net
StorageStorage
WAL and Slony-I repare future projects
![Page 31: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/31.jpg)
31
USE IMPROVE EVANGELIZE
Cluster in Action
![Page 32: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/32.jpg)
32
USE IMPROVE EVANGELIZE
PostgreSQL● The demo will show a live cluster with
PostgreSQL
![Page 33: Availability of PostgreSQL in the Datacenter - PostgreSQL wiki](https://reader030.vdocuments.net/reader030/viewer/2022021007/62039ba5da24ad121e4b6184/html5/thumbnails/33.jpg)
USE IMPROVE EVANGELIZE
Thank you!
Detlef [email protected]
“open” artwork and icons by chandan: http://blogs.sun.com/chandan