Jump to Content
SAP on Google Cloud

SAP MaxDB High Availability (HA) solution using Google Cloud Native storage

September 13, 2023
Srinivas Totapally

SAP Cloud Consultant, Google Cloud Consulting

Gaurav Desai

SAP Cloud Consultant, Google Cloud Consulting

Introduction

SAP's MaxDB database is an important aspect of a customer's environment, with common use cases such as:

SAP Content Server for document storage

SAP LiveCache for Supply Chain Management (SCM) and/or Advanced Planner and Optimizer (APO) functions

SAP Business All-In-One customer's primary database in some cases

Downtime for these systems will have a material impact on business operations, not to mention the ability to make strategic, tactical and operational decisions. 

To help businesses solve these high availability (HA) challenges, using Google Cloud inherent storage capabilities, the Google Cloud Consulting team has created a solution to provide HA for SAP's MaxDB database using Google Cloud's Regional Persistent Disk (referred to as RPD in this article).

At a recent customer account, this solution helped to secure the landscape for a critical internal application that serviced over 120K users in Production.

MaxDB High Availability Options Considered 

Before we get into Regional PD, let's look at some of the more traditional options for MaxDB high availability that are possible.

https://storage.googleapis.com/gweb-cloudblog-publish/images/1_9qZK4vi.max-800x800.png

1: Automatic Log recovery is available as of SAP MaxDB version 7.9.10.06
2: See SAP Note 952783 for Third Party solutions

As noted, the solutions above come with limitations. For instance, the Standby Database requires manual intervention, and recovery times are variable based on the amount of Redo logs that must be applied. The Hot Standby has a faster recovery time, however there's a dependency on a 3rd party vendor to provide an API library that runs as part of the SAP MaxDB runtime environment. The Synchronization Manager is unable to handle high change rate volumes, and requires the design of a data model to establish master & client table definitions. The Storage based cluster requires some tuning to ensure cluster parameters are set optimally.

Regional PD Based Solution 

What is a Regional Persistent Disk?

Regional PD is a storage option that provides synchronous replication of data between two zones in a region. 

The benefit of regional persistent disks is that in the event of a zonal outage, where your virtual machine (VM) instance might become unavailable, you have the ability to force attach a regional persistent disk to a VM instance in a secondary zone in the same region.

A simple architecture diagram with Regional PD for a stateful database application looks like this:

https://storage.googleapis.com/gweb-cloudblog-publish/images/2_opLAPhC.max-1300x1300.jpg

How Regional PD Compares to Other Storage Options

Of course Regional PD is not the only solution possible for shared file storage. Setting up a manual NFS based server (or pair for HA) is available, along with managed file store solutions. Here's a quick comparison of those solutions in relation to Regional PD.

https://storage.googleapis.com/gweb-cloudblog-publish/images/3_rHIsKZT.max-2000x2000.jpg

3: Varies based on solution & vendor requirements
4: 10GB minimum for PD-Balanced and PD-SSD

Architecture

The architecture consists of two nodes, across two zones, with an internal load balancer serving traffic to the active Primary database instance based on the HAProxy health check listener.

The MaxDB database instance is installed on a single Regional PD, including the database binaries, the data area, and log area.

https://storage.googleapis.com/gweb-cloudblog-publish/images/4_F2zTpZV.max-2000x2000.png

Pacemaker is a high availability cluster resource manager, and is used for Linux distributions. The set of Pacemaker resource agents required in the configuration includes the following:

HAProxy - For the health check listener process

GCP-PD-MOVE - To detach and attach the regional PD

LVM - To activate/deactivate the logical volume after the disk is moved to the other node.

Filesystem - To mount/unmount the /sapdb filesystem 

SAPDatabase - To monitor and control the MaxDB database

Fence_GCE - GCP Fencing agent

Conclusion 

If your application running on SAP MaxDB requires high availability, determine whether the Regional PD solution is right for your scenario. A few items for consideration:

Regional PD is supported for certain machine types, therefore confirm if it meets your requirements & choose from a GCP supported machine type for SAP. See the full list of Regional PD supported machine types.

Start small with Regional PD size requirements, as you can resize upwards only.

Check that your block storage performance requirements for IOPS & Throughput align with what Regional PD offers

If you are interested in more information regarding a SAP MaxDB Regional PD solution, please contact your Google Cloud account manager.

Posted in