PostgreSQL Clustering with Red Hat Cluster Suite



Similar documents
Linux Cluster. Administration

Configuring and Managing a Red Hat Cluster. Red Hat Cluster for Red Hat Enterprise Linux 5

Red Hat Enterprise Linux 6 Cluster Suite Overview. Overview of the High Availability Add- On for Red Hat Enterprise Linux 6

Parallels. Clustering in Virtuozzo-Based Systems

High Availability Solutions for MySQL. Lenz Grimmer DrupalCon 2008, Szeged, Hungary

Red Hat Cluster Suite for Red Hat Enterprise Linux 5.2

Parallels Virtuozzo Containers 4.7 for Linux

Red Hat Cluster Suite Overview. Red Hat Cluster Suite for Red Hat Enterprise Linux 5

CentOS Cluster Server. Ryan Matteson

Cluster Configuration Manual Cluster configuration on Database Servers

Red Hat Cluster Suite

Managing your Red Hat Enterprise Linux guests with RHN Satellite

Preparation Guide. How to prepare your environment for an OnApp Cloud v3.0 (beta) deployment.

Deploying Windows Streaming Media Servers NLB Cluster and metasan

Intel RAID High Availability Solution for Red Hat * Linux Systems. Best Practices White Paper

Red Hat Network Satellite (On System z) 18-JUNE CAVMEN Meeting

High Availability with Postgres Plus Advanced Server. An EnterpriseDB White Paper

Clustering in Parallels Virtuozzo-Based Systems

Enterprise Linux Business Continuity Solutions for Critical Applications

This document may be freely distributed provided that it is not modified and that full credit is given to the original author.

HPSA Agent Characterization

High Availability & Disaster Recovery Development Project. Concepts, Design and Implementation

Red Hat Network Satellite High Availability Guide By Wayman Smith, Red Hat Consultant

Astaro Deployment Guide High Availability Options Clustering and Hot Standby

Introduction to MPIO, MCS, Trunking, and LACP

Using Red Hat Network Satellite Server to Manage Dell PowerEdge Servers

Red Hat Global File System for scale-out web services

Shared Parallel File System

The Red Hat Cluster Suite NFS Cookbook

29/07/2010. Copyright 2010 Hewlett-Packard Development Company, L.P.

Implementing Red Hat Enterprise Linux 6 on HP ProLiant servers

Best Practices for Data Sharing in a Grid Distributed SAS Environment. Updated July 2010

MySQL High Availability Solutions. Lenz Grimmer OpenSQL Camp St. Augustin Germany

How To Make An Org Database Available On Linux

Architecting for the next generation of Big Data Hortonworks HDP 2.0 on Red Hat Enterprise Linux 6 with OpenJDK 7

Red Hat Enterprise linux 5 Continuous Availability

Deployment Guide. How to prepare your environment for an OnApp Cloud deployment.

Cisco Prime Home 5.0 Minimum System Requirements (Standalone and High Availability)

Overview of I/O Performance and RAID in an RDBMS Environment. By: Edward Whalen Performance Tuning Corporation

Red Hat Enterprise Linux and management bundle for HP BladeSystem TM

Implementing Failover Capabilities in Red Hat Network Satellite

Develop a process for applying updates to systems, including verifying properties of the update. Create File Systems

The functionality and advantages of a high-availability file server system

Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL

Eliminate SQL Server Downtime Even for maintenance

High Availability for Informatica Data Replication in a Cluster Environment

High Availability with Elixir

White Paper. Dell Reference Configuration

PVFS High Availability Clustering using Heartbeat 2.0

High Availability Solutions for the MariaDB and MySQL Database

White Paper. Fabasoft on Linux Cluster Support. Fabasoft Folio 2015 Update Rollup 2

COMPLEXITY AND COST COMPARISON: CISCO UCS VS. IBM FLEX SYSTEM (REVISED)

High Availability Databases based on Oracle 10g RAC on Linux

Ignify ecommerce. Item Requirements Notes

Open Source Datacenter Conference 2011 System Management with RHN Satellite. Dirk Herrmann, Solution Architect, Red Hat

Advanced Linux System Administration on Red Hat

HP Serviceguard Cluster Configuration for HP-UX 11i or Linux Partitioned Systems April 2009

ORACLE DATABASE HIGH AVAILABILITY STRATEGY, ARCHITECTURE AND SOLUTIONS

System Management with RHN Satellite

INUVIKA TECHNICAL GUIDE

SIP-DECT Knowledge Base SIP-DECT System Update

Storage Management for the Oracle Database on Red Hat Enterprise Linux 6: Using ASM With or Without ASMLib

Red Hat Enterprise Virtualization - KVM-based infrastructure services at BNL

Parallels Cloud Server 6.0

3 Red Hat Enterprise Linux 6 Consolidation

Monitoring an HP platform based solution and SNMPv2/v3 alarm forwarding and synchronization with an existing NMS

Active-Active and High Availability

This guide specifies the required and supported system elements for the application.

SUSE Manager. A Comprehensive Linux Server Management the Linux Way. Name. Title

Oracle RAC Services Appendix

Vertical Scaling of Oracle 10g Performance on Red Hat Enterprise Linux 5 on Intel Xeon Based Servers. Version 1.0

Implementing a High Availability ENOVIA Synchronicity DesignSync Data Manager Solution

Linux High Availability

Cloud Storage. Parallels. Performance Benchmark Results. White Paper.

RFP - Equipment for the Replication of Critical Systems at Bank of Mauritius Tower and at Disaster Recovery Site. 06 March 2014

NoSQL Performance Test In-Memory Performance Comparison of SequoiaDB, Cassandra, and MongoDB

Installing and Configuring Websense Content Gateway

FOR SERVERS 2.2: FEATURE matrix

PolyServe Matrix Server for Linux

Experience and Lessons learnt from running High Availability Databases on Network Attached Storage

HP reference configuration for entry-level SAS Grid Manager solutions

Windows Host Utilities Installation and Setup Guide

High Availability Infrastructure for Cloud Computing

Brocade and EMC Solution for Microsoft Hyper-V and SharePoint Clusters

Performance Analysis of RAIDs in Storage Area Network

Scalable NAS for Oracle: Gateway to the (NFS) future

Dell EqualLogic Best Practices Series

Configuring an OpenNMS Stand-by Server

OpenClovis Product Presentation

Accelerating Applications and File Systems with Solid State Storage. Jacob Farmer, Cambridge Computer

Red Hat Network Satellite Management and automation of your Red Hat Enterprise Linux environment

Critical SQL Server Databases:

Parallels Cloud Server 6.0

Building and Managing a Standard Operating Environment

Transcription:

PostgreSQL Clustering with Red Hat Cluster Suite Devrim GÜNDÜZ PostgreSQL Contributor Twitter: @DevrimGunduz Red Hat Certified Engineer Community: devrim@postgresql.org Personal: devrim@gunduz.org

Before we start... Thanks to who involved in this conference.

...who is this guy? I have been contributing to PostgreSQL over the last 8 years. I'm not a hacker, I work on RPMs and website. I rarely break RPMs, but break website more often. Working as a PostgreSQL DBA right now at markafoni. Live in Istanbul. Have a son.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover, switchover... Postgres-XC Questions?

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover, switchover... Postgres-XC Questions?

Goals Active/passive clustering Having a redundant system Data redundancy Network redundancy Server and power redundancy Maximum uptime Service failover (=PostgreSQL) Data integrity

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover... Postgres-XC Questions?

Why Red Hat Cluster Suite (RHCS)? Open Source Clustering Solution Developed by Red Hat, with the community Available through (Red Hat Network) RHN, but also available via the CentOS repositories (unsupported by Red Hat, or supported by 3 rd party support companies)

Why RHCS? RHEL 5 Advanced Platform provides RHCS+GFS. It is the only open source clustering solution that has decent support. Use at least RHEL 5.4. All versions prior to that are broken in various ways. Minimizes downtime

Why RHCS? Support wide range of hardware Application/Service Failover - Create n-node server clusters for failover of key applications and services Load Balancing - Load balance incoming IP network requests across a farm of servers TGIOS! (Thanks God It is Open Source)

RHCS Overview Supports up to 16 nodes (RHCS 5). The upper limit is 8 for RHEL 3 and 4. All PostgreSQL nodes can access to the same storage, but they don't use it at the same time. Automatic failover http://www.redhat.com/cluster_suite/ http://sources.redhat.com/cluster/wiki/ (Development site)

What else? RHCS avoids cancer. It helps peace in the world. RHCS cannot be used as a replica. If you want to hear about replicas, this is not the right talk. RHCS does not run on Windows. It does not do multimaster clustering. Postgres-XC? We will talk about it later.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover,... Postgres-XC Questions?

Before initializing setup Make sure that you have at least a RHCE or similar around.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover, switchover... Caveats Questions?

Hardware and software requirements Minimum hardware: An hardware that Red Hat Enterprise Linux can run. Typical hardware : Depends on your needs. See related threads in pgsqlperformance mailing list. SAN : Storage is the most important part Use RAID arrays.

Hardware and software RHCS is built on GFS. GFS is built on LVM. PostgreSQL :-) requirements Each node needs to have 1GB ram (not for PostgreSQL, it is for RHCS) Decent fibre channel switch to storage, decent ethernet switches for internal and external communications.

Choosing the right hardware: Network Multicast traffic must be supported / enabled in network switches. Testing: ping -t 1 -c 2 224.0.0.1 Cluster services may not work if they don't respond to ICMP echo requests.

Choosing the right hardware: Fencing Fencing: Disconnection of a node from the cluster's shared storage (RHCS docs) It cuts off I/O from share storage to ensure data integrity. System must have a supported fencing device..

Choosing the right hardware: Fencing Power fencing : Uses a power controller to power off an inoperable node. Fibre Channel switch fencing : Disables the Fibre Channel port that connects storage to an inoperable node. GNBD fencing :Disables an inoperable node's access to a GNBD server. Other fencing :Several other fencing methods that disable I/O or power of an inoperable node, including IBM Bladecenters, PAP, DRAC/MC, HP ILO, IPMI, IBM RSA II, and others.

Design and howtos We need two servers that has been setup identically. Only OS and PostgreSQL will run Same PostgreSQL versions. Using GFS, all data will be mounted from the storage. GFS is not a requirement, but we would better be safe. When node1 goes down, node2 will act as active server by announcing specified cluster ip. When node1 comes back, the process is reverted.

Hardware and software requirements http://www.redhat.com/cluster_suite/hardware/ Check this list before you purchase the hardware. HP Blade Servers have been proved to be working well with RHCS. Recommended. Make sure that you have updated firmware.

Active/Passive Cluster Overview

Sharding, multiple nodes

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover Postgres-XC Questions?

Setting up RHCS Before we start: Do NOT edit contents of cluster.conf manually. If you choose to edit cluster.conf manually, make sure that xml version numbers are identical on each node. If you think that you will screw up things, ask someone else. Be patient. This is not a plug-and-play solution.

Services that needs to start on boot clvmd cman gfs rgmanager PostgreSQL chkconfig is your friend.

RPM packages Cluster packages must be installed prior to setup. Perl-Crypt-SSLeay package is essential for fencing mechanism to function properly.

Setting up Cluster RHEL 5 provides system-config-cluster (scc), which is not supported in RHEL 6. Use only very recent versions of scc, otherwise you may screw up your cluster. scc helps you versioning your cluster configuration. Make sure that it is the same in all nodes. clusterssh will be your best friend during setup.

Features of Conga (copied from RHEL 6 docs) One Web interface for managing cluster and storage Automated Deployment of Cluster Data and Supporting Packages Easy Integration with Existing Clusters Integration of Cluster Status and Logs

Conga (RHEL 6) 2 components: luci and ricci Luci: server side tool, communicates with ricci. Ricci: agent tool that runs on cluster members, and coammunicates with luci. TGIP (Thanks God It's Python!)

cluster.conf example Let me run an editor first :)

#!/bin/sh Sample resource script start() { /etc/cluster/networkstart0 service postgresql-1 start } stop() { service postgresql-1 stop /etc/cluster/networkstop0 }...

networkstop0 #!/bin/bash cp /etc/cluster/ifcfg-bond0.561:0 \ /etc/sysconfig/network-scripts/ ifdown bond0.561:0 rm -f /etc/sysconfig/networkscripts/ifcfg-bond0.561:0 ifcfg-bond0* file is a regular ifcfg file, which includes cluster ips. Trick: ONBOOT=no

networkstart0 #!/bin/bash cp /etc/cluster/ifcfg-bond0.561:0 \ /etc/sysconfig/network-scripts/ ifup bond0.561:0 rm -f /etc/sysconfig/networkscripts/ifcfg-bond0.561:0

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover, switchover... Postgres-XC Caveats Questions?

Setting up PostgreSQL No specific tuning needed. However, if you are using more than one node, you will want to be careful while sharing hardware resources. You will want to use unix_socket_directory parameter, so that each instance will use the same TCP/IP port, so that you'll avoid using workarounds in your application side.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover Postgres-XC Questions?

Failover RHCS handles failover properly. It detects dead node, and moves service to the next machine, as configured in cluster.conf Once the dead machine is up, service is transferred back to it. ~30 seconds of downtime during this operation.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover Postgres-XC Questions?

Postgres-XC A new synchronous and transparent clustering solution for PostgreSQL, providing both read and write scalability 0.9.3 http://postgres-xc.sourceforge.net Can be used with or without RHCS, and it will work more or less like Oracle RAC. Under heavy development They have a talk tomorrow.

Goals Agenda Why Red Hat Cluster Suite (RHCS)? Before initializing setup... Choosing right hardware (including network) Setting up RHCS Setting up PostgreSQL Failover Postgres-XC Questions?

PostgreSQL Clustering with Red Hat Cluster Suite Devrim GÜNDÜZ PostgreSQL Contributor Twitter: @DevrimGunduz Red Hat Certified Engineer Community: devrim@postgresql.org Personal: devrim@gunduz.org