Scaling SAP in the Cloud

by Timothy Carioscio

Scaling workloads is one of the major benefits of cloud computing. AWS and other hyper scale cloud providers provide the ability to procure infrastructure with code, launch it quickly, and terminate it just as fast. If your cloud-based workload doesn't need a lot of horsepower right now, that's fine, just use what you need and pay for an instance that is appropriately sized. If the time comes when you require a bit more giddy-up, it's possible to scale your system for that new need, and only then will you pay for the additional compute. This is called scaling.

There are two modes of scaling in cloud computing, scale-up (also known as vertical scaling) and scale-out (horizontal scaling). Scale-up is when a single workload is increased in size to meet demand, whereas scale-out is when additional workloads are added to a system and the load is shared among all of them. When given the choice, it is best practice to for cloud workloads to scale-out instead of scale-up.

To quote the AWS Well-Architected Framework Reliability Pillar:

Scale horizontally to increase aggregate workload availability: Replace one large resource with multiple small resources to reduce the impact of a single failure on the overall workload. Distribute requests across multiple, smaller resources to ensure that they don’t share a common point of failure.

Why would they bother even including scale-up as a mode of scaling? Because some workloads don't play nice with scale-out. SAP HANA is one such workload.

SAP HANA is an amazing database. It is a robust and powerful in-memory database that has been purpose-designed without compromise to run SAP workloads. Its columnar data storage and in-memory architecture make it a workhorse fit to sit at the center of a company's digital core, but it's not without its challenges. Because of its unique design considerations, SAP HANA does not lend itself to horizontal scaling. If your business begins outgrowing your SAP HANA DB, that's a great problem to have! You're growing and transacting within SAP more than ever before. It's absolutely possible to scale-up your HANA DB, but that requires stopping the instance and re-launching it again with the needed compute increase.

SAP application servers, however, do lend themselves to horizontal scaling. They are an ideal use-case for automatic scale-out based on the state of the SAP application.

Many SAP customers will have variable demand on their SAP environment. Variable demand could occur for a number of reasons. They could be a global company operating 24/7 with certain timezones having fewer active users. They could be a company with seasonal fluctuations, tripling their warehouse staff with temporary workers to meet the summer rush. Whatever the unique business case may be, it's best not to pay for four application servers when two will suffice.

Amazon EC2 auto-scaling diagram
Source: Amazon EC2 Auto Scaling User Guide

AWS auto-scaling allows SAP customers to configure event-driven rules that will provision SAP application server capacity to fit the demand, then gracefully terminate them again when they are no longer needed. For example, when SAP is running low on available dialog processes, additional application servers can be provisioned to increase capacity, then when the system demand lowers, those additional application servers will automatically be terminated.

The cost savings that can be gained using auto-scaling varies from workload to workload depending on the system demand and the range of capacity needed. Because each company's SAP needs and demands are unique, a deeper dive is required to accurately estimate just how much auto-scaling will save. When SAP environments have highly variable capacity demands, the cost savings to be had are often non-trivial.

Diagram of changing EC2 capacity over time
Source: Amazon EC2 Auto Scaling User Guide

Application auto-scaling isn't right for all cloud-based SAP workloads. Some SAP landscapes have consistent capacity needs, or have small enough capacity demands that a single application server will never be burdened enough to necessitate a second application. If your landscape gets bogged down at certain times of the day or the year, or you fear you've over-provisioned the number of application servers in your landscape, AWS auto-scaling is a great tool to reduce cost and increase system reliability.

Title photo by ThisisEngineering RAEng on Unsplash

About the author: Timothy Carioscio

Tim is an AWS evangelist. Rather than having his head in the clouds, he lives with the Cloud in his head.