This guide provides an overview of the options, recommendations, and general concepts that you need to know before you deploy a high-availability (HA) SAP HANA system on Google Cloud.
This guide assumes that you already have an understanding of the concepts and practices that are generally required to implement an SAP HANA high-availability system. Therefore, the guide focuses primarily on what you need to know to implement such a system on Google Cloud.
If you need to know more about the general concepts and practices that are required to implement an SAP HANA HA system, see:
- The SAP best practices document Building High Availability for SAP NetWeaver and SAP HANA on Linux
- The SAP HANA documentation
This planning guide focuses solely on HA for SAP HANA and does not cover HA for application systems. For information about HA for SAP NetWeaver, see the High-availability planning guide for SAP NetWeaver on Google Cloud.
This guide does not replace any documentation that is provided by SAP.
High availability options for SAP HANA on Google Cloud
You can use a combination of Google Cloud and SAP features in the design of a high availability configuration for SAP HANA that can handle failures at both the infrastructure or software levels. The following tables describe SAP and Google Cloud features that are used to provide high availability.
|Compute Engine live migration||
Compute Engine monitors the state of the underlying infrastructure and automatically migrates your instance away from an infrastructure maintenance event. No user intervention is required.
Compute Engine keeps your instance running during the migration if possible. In the case of major outages, there might be a slight delay between when the instance goes down and when it is available.
In multi-host systems, shared volumes, such as the `/hana/shared` volume used in the deployment guide, are persistent disks attached to the VM that hosts the master host, and are NFS-mounted to the worker hosts. The NFS volume is inaccessible for up to a few seconds in the event of the master host's live migration. When the master host has restarted, the NFS volume functions again on all hosts, and normal operation resumes automatically.
A recovered instance is identical to the original instance, including the instance ID, private IP address, and all instance metadata and storage. By default, standard instances are set to live migrate. We recommend not changing this setting.
For more information, see Live migrate.
|Compute Engine automatic restart||
If your instance is set to terminate when there is a maintenance event, or if your instance crashes because of an underlying hardware issue, you can set up Compute Engine to automatically restart the instance.
By default, instances are set to automatically restart. We recommend not changing this setting.
|SAP HANA Service Auto-Restart||
SAP HANA Service Auto-Restart is a fault recovery solution provided by SAP.
SAP HANA has many configured services running all the time for various activities. When any of these services is disabled due to a software failure or human error, the SAP HANA service auto-restart watchdog function restarts it automatically. When the service is restarted, it loads all the necessary data back into memory and resumes its operation.
|SAP HANA Backups||
SAP HANA backups create copies of data from your database that can be used to reconstruct the database to a point in time.
For more information about using SAP HANA backups on Google Cloud, see the SAP HANA operations guide.
|SAP HANA Storage Replication||
SAP HANA storage replication provides storage-level disaster recovery support through certain hardware partners. SAP HANA storage replication isn't supported on Google Cloud. You can consider using Compute Engine persistent disk snapshots instead.
For more information about using persistent disk snapshots to back up SAP HANA systems on Google Cloud, see the SAP HANA operations guide.
|SAP HANA Host Auto-Failover||
SAP HANA host auto-failover is a local fault recovery solution that requires one or more standby SAP HANA hosts in a scale-out system. If one of the main hosts fail, host auto-failover automatically brings the standby host online and restarts the failed host as a standby host.
For more information, see:
|SAP HANA System Replication||
SAP HANA system replication allows you to configure one or more systems to take over for your primary system in high-availability or disaster recovery scenarios. You can tune replication to meet your needs in terms of performance and failover time.
OS-native HA clusters for SAP HANA on Google Cloud
Linux operating system clustering provides application and guest awareness for your application state and automates recovery actions in case of failure.
Although the high-availability cluster principles that apply in non-cloud environments generally apply on Google Cloud, there are differences in how some things, such as fencing and virtual IPs, are implemented.
You can use either Red Hat or SUSE high-availability Linux distributions for your HA cluster for SAP HANA on Google Cloud.
Cluster resource agents
Both Red Hat and SUSE provide resource agents for Google Cloud with their high-availability implementations of the Pacemaker cluster software. The resource agents for Google Cloud manage STONITH fencing, VIPs that are implemented with either routes or alias IPs, and storage actions.
To deliver updates that are not yet included in the base OS resource agents, Google Cloud periodically provides companion resource agents for HA clusters for SAP. When these companion resource agents are required, the Google Cloud deployment procedures include a step for downloading them.
The resource agents that both Red Hat and SUSE provide manage STONITH fencing on Google Cloud.
Virtual IP address
High-availability clusters for SAP on Google Cloud use a virtual, or floating, IP address (VIP) to redirect network traffic from one host to another in the event of a failover.
Typical non-cloud deployments use a gratuitous Address Resolution Protocol (ARP) request to announce the movement and reallocation of a VIP to a new MAC address.
On Google Cloud, instead of using gratuitous ARP requests, you use one of several different methods to move and reallocate a VIP in an HA cluster. The recommended method is to use an internal TCP/UDP load balancer, but, depending on your needs, you can also use route-based VIP implementation or an alias-IP-based VIP implementation.
For more information about VIP implementation on Google Cloud, see Virtual IP implementation on Google Cloud.
Storage and replication
An SAP HANA HA cluster configuration uses synchronous SAP HANA System Replication to keep the primary and secondary SAP HANA databases in sync. The standard OS-provided resource agents for SAP HANA manage System Replication during a failover, starting and stopping the replication, and switching which instances are serving as the active and the standby instances in the replication process.
If you need shared file storage, NFS- or SMB-based filers can provide the required functionality.
For a high-availability shared storage solution you can use a third-party file-sharing solution, such as NetApp Cloud Volumes. Google Cloud provides an NFS file server solution, Filestore, but Filestore does not currently provide a file server that is highly available across zones.
Compute Engine regional persistent disks offer synchronously replicated block storage across zones. Although regional persistent disks are not supported for database storage in SAP HA systems, you can use them with NFS file servers.
For more information about storage options on Google Cloud, see:
Time out and interval settings
The timeout and check-interval settings for the resource agents and cluster configuration affect how quickly the cluster software triggers a failover. The values that are used in the Google Cloud instructions and automation for HA clusters can differ slightly from the default values of the cluster software, but either set of values should be sufficient in most cases. You can adjust the values if you need to. Just be sure to test whatever values you use in your environment before releasing the system for use.
The timeout and check-interval values suggested by Google Cloud account for Google Cloud's Live Migration maintenance events, the length of which can vary slightly depending on the machine type you are using and other factors. For more information, see Live Migration.
After your cluster is deployed, test your settings by triggering a live
migration event on the primary host with the Cloud SDK command
gcloud compute instances simulate-maintenance-event.
Logging and monitoring
Resource agents can include logging capabilities that propagate logs to
Google Cloud's operations suite for analysis. Each resource agent includes configuration
information that identifies any logging options. In the case of bash
implementations, the logging option is
You can also install the Cloud Logging agent to capture log output from operating system processes and correlate resource utilization with system events. The Logging agent captures default system logs, which include log data from Pacemaker and the clustering services. For more information, see About the Logging agent.
For information about using Cloud Monitoring to configure service checks that monitor the availability of service endpoints, see Managing uptime checks.
Service accounts and HA clusters
The actions that the cluster software can take in the Google Cloud environment are secured by the permissions that are granted to the service account of each host VM. For high-security environments, you can limit the permissions in the service accounts of your host VMs to conform to the principle of least privilege.
When limiting the service account permissions, keep in mind that your system might interact with Google Cloud services, such as Cloud Storage, so you might need to include permissions for those service interactions in the service account of the host VM.
For the most restrictive permissions, create a custom role with the minimum required permissions. For information about custom roles, see Creating and managing custom roles. You can further restrict permissions by limiting them to only specific instances of a resource, such as the VM instances in your HA cluster, by adding conditions in the role bindings of a resource's IAM policy.
The minimum permissions that your systems need depends on the Google Cloud resources that your systems access and the actions that your systems perform. Consequently, determining the minimum required permissions for the host VMs in your HA cluster might require you to investigate exactly which resources the systems on the host VM access and the actions that those systems perform with those resources.
As a starting point, the following list shows some HA cluster resources and the associated permissions that they require:
- STONITH fencing
- VIP implemented by using an alias IP
- VIP implemented by using static routes
- VIP implemented by using an internal load balancer
- No specific permissions required - the load balancer operates on health check statuses that does not require the cluster to interact with or change resources in Google Cloud
Virtual IP implementation on Google Cloud
A high-availability cluster uses a floating or virtual IP address (VIP) to move its workload from one cluster node to another in the event of an unexpected failure or for scheduled maintenance. The IP address of the VIP doesn't change, so client applications are unaware that the work is being served by a different node.
A VIP is also referred to as a floating IP address.
On Google Cloud, VIPs are implemented slightly differently than they are in on-premises installations, in that when a failover occurs, gratuitous ARP requests cannot be used to announce the change. Instead, you can implement a VIP address for an SAP HA cluster by using one of the following methods:
- Internal TCP/UDP Load Balancing failover support (recommended).
- Google Cloud static routes.
- Google Cloud alias IP addresses.
Internal TCP/UDP Load Balancing VIP implementations
A load balancer typically distributes user traffic across multiple instances of your applications, both to distribute the workload across multiple active systems and to protect against a processing slowdown or failure on any one instance.
The Internal TCP/UDP Load Balancing service also provides failover support that you can use with Compute Engine health checks to detect failures, trigger failover, and reroute traffic to a new primary SAP system in an OS-native HA cluster.
Internal TCP/UDP Load Balancing failover support is the recommended VIP implementation for a variety of reasons, including:
- Load balancing on Compute Engine offers a 99.99% availability SLA.
- Load balancing supports multi-zone high-availability clusters, which protects against zone failures with predictable cross-zone failover times.
- Using load balancing reduces the time required to detect and trigger a failover, usually within seconds of the failure. Overall failover times are dependent on the failover times of each of the components in the HA system, which can include the hosts, database systems, application systems, and more.
- Using load balancing simplifies cluster configuration and reduces dependencies.
- Unlike a VIP implementation that uses routes, with load balancing, you can use IP ranges from your own VPC network, allowing you to reserve and configure them as needed.
- Load balancing can easily be used to reroute traffic to a secondary system for planned maintenance outages.
When you create a health check for a load balancer implementation of a VIP, you specify the host port that the health check probes to determine the health of the host. For an SAP HA cluster, specify a target host port that is in the private range, 49152-65535, to avoid clashing with other services. On the host VM, configure the target port with a secondary helper service, such as the socat utility or HAProxy.
For database clusters in which the secondary, standby system remains online, the health check and helper service enables load balancing to direct traffic to the online system that is currently serving as the primary system in the cluster.
Using the helper service and port redirection, you can trigger a failover for planned software maintenance on your SAP systems.
For more information about the failover support of the Internal TCP/UDP Load Balancing, see Configuring failover for Internal TCP/UDP Load Balancing.
To deploy an HA cluster with a load-balancer VIP implementation, see:
- HA cluster configuration guide for SAP HANA on RHEL
- HA cluster configuration guide for SAP HANA on SLES
Static route VIP implementations
The static route implementation also provides protection against zone failures, but requires you to use a VIP outside of the IP ranges of your existing VPC subnets where the VMs reside. Consequently, you also need to make sure that the VIP does not conflict with any external IP addresses in your extended network.
Static route implementations can also introduce complexity when used with shared VPC configurations, which are intended to segregate network configuration to a host project.
If you use a static route implementation for your VIP, consult with your network administrator to determine a suitable IP address for a static route implementation.
Alias IP VIP implementations
Alias IP VIP implementations are not recommended for multi-zone HA deployments because, if a zone fails, the reallocation of the alias IP to a node in a different zone can be delayed. Implement your VIP with an Internal TCP/UDP Load Balancing with failover support instead.
If you are deploying all nodes of your SAP HA cluster in the same zone, you can use an alias IP to implement a VIP for the HA cluster.
If you have existing multi-zone SAP HA clusters that use an alias IP implementation for the VIP, you can migrate to an Internal TCP/UDP Load Balancing implementation without changing your VIP address. Both alias IP and Internal TCP/UDP Load Balancing use IP ranges from your VPC network.
While alias IP addresses are not recommended for VIP implementations in multi-zone HA clusters, they have other use cases in SAP deployments. For example, they can be used to provide a logical host name and IP assignments for flexible SAP deployments, such as those managed by SAP Landscape Management.
General best practices for VIPs on Google Cloud
For more information about VIPs on Google Cloud, see Best Practices for Floating IP Addresses.
SAP HANA host auto-failover on Google Cloud
Google Cloud supports SAP HANA auto host-failover, the local fault-recovery solution provided by SAP HANA. The host auto-failover solution uses one or more standby hosts that are kept in reserve to take over work from the master or a worker host in the event of a host failure. The standby hosts do not contain any data or process any work.
/hana/log volumes are mounted on the master and
worker hosts only. When a takeover occurs, the host auto-failover solution
uses the SAP HANA Storage Connector API and the Compute Engine
gceStorageConnector plugin to manage the switching of these disks from
the failed host to the standby host. The configuration parameters for the
gceStorageConnector plugin, including whether fencing is enabled or disabled,
are stored in the storage section of the SAP HANA global.ini file.
/hanabackup volumes are stored on an NFS server, which
is managed by the master host and mounted on all hosts, including the
After a failover completes, the failed host is restarted as a standby host.
SAP supports up to three standby hosts in scale-out systems on Google Cloud. The standby hosts do not count against the maximum of 16 active hosts that SAP supports in scale-out systems on Google Cloud.
Currently, Google Cloud supports SAP HANA host auto-failover on only
the SUSE Linux Enterprise Server (SLES) for SAP public images that are
available from Compute Engine in the
sles-12-sp2-sap image families. To see the public images that
are available from Compute Engine, see
The following diagram shows a multi-host architecture on Google Cloud that
includes support for SAP HANA host auto-failover. In the diagram, worker host 2
fails and the standby host takes over. The gceStorageClient plugin works with
the SAP Storage Connector API (not shown) to detach the disks that contain the
/hana/logs volumes from the failed worker and to remount them
on the standby host, which then becomes worker host 2 while the failed host
becomes the standby host.
Deployment options for SAP HANA high availability configurations
Google Cloud provides Deployment Manager templates that you can use to automate the deployment of SAP HANA HA systems or you can deploy and configure your SAP HANA HA systems manually.
The Deployment Manager templates that Google Cloud
provides include a
file that you complete. Deployment Manager reads the
configuration file and deploys a SAP HANA system for you that is fully
supported by SAP and that adheres to the best practices of both SAP and
Automated deployment of Linux high-availability clusters for SAP HANA
For SAP HANA, Deployment Manager deploys a performance-optimized, high-availability Linux cluster that includes:
- Automatic failover
- Automatic restart
- Synchronous replication
- Memory preload
- The Pacemaker high-availability cluster resource manager
- A Google Cloud fencing mechanism
- A VM with the required persistent disks for each SAP HANA instance
- A SAP HANA instance on each VM
For more information, see the SAP HANA High-Availability Cluster Deployment Guide.
Automated deployment of SAP HANA scale-out systems with SAP HANA host auto-failover
Manual deployment of SAP HANA high-availability clusters
When you configure an HA cluster manually, to ensure your SAP HANA systems meet SAP supportability requirements and best practices, deploy the VMs and SAP HANA instances first by using the Deployment Manager template that Google Cloud provides.
For instructions for deploying and manually configuring an HA cluster on Google Cloud for SAP HANA, see:
Both Google Cloud and SAP provide more information about high availability.
More information from Google Cloud about high availability
For more information about high-availability for SAP HANA on Google Cloud, see:
For general information about protecting systems on Google Cloud against various failure scenarios, see Designing robust systems.
More information from SAP about SAP HANA high availability features
For more information from SAP about SAP HANA high availability features, refer to the following documents: