SAP Server Auto Scaling: Optimize Infrastructure Costs While Meeting Workload Demands

2 days ago 7

Introduction

Migrating SAP to AWS offers customers the ability to modernize their SAP landscape and take advantage of the benefits from running in the cloud.

A number of these benefits are available out of the box, such as the ease to change an instance type and memory/CPU capabilities within minutes, as well as resizing disk volumes and automating all of the provisioning process to reduce human errors.

One benefit that is more complex to achieve is using the cloud-native capability of auto scaling for the Application Servers. Traditionally, customers have over-provisioned SAP app servers to protect against system disruption during periods with unusually high demand, leaving customers always paying for the highest expected load and not being able to use the elasticity benefits of being in the cloud.

Traditional AWS Auto Scaling groups, Target Groups and Launch Templates cannot be used in an SAP architecture due to the complexity of the environment. This blog post presents the SAP Auto Scaling offer provided by AWS Professional Services, which helps customers to use the horizontal scaling capability of being in the cloud to achieve up to 50% savings on their spend on Application Servers infrastructure.

Business Case for Auto Scaling

The SAP Auto Scaling offer is designed to address customer’s typical challenges such as:

  1. Having the provisioned SAP infrastructure automatically scale based on the demand, minimizing costs and avoiding overload situations.
  2. Having the ability to automatically turn on/off additional capacity during upgrades or maintenance activities.
  3. Optimizing the operational costs by appropriately automating operations.

The solution will be beneficial for Medium or Large Enterprise customers who are running or planning to migrate their SAP applications to AWS. Other important qualification criteria to maximize the benefits from the solution are:

  1. Customers who experience periods of low utilization e.g., weekends, night time mid-month etc.
  2. Customers who want to reduce Amazon EC2 costs during low-utilization periods.
  3. Using at least 3 SAP Application Servers in their Production environment.
  4. Customers who are looking not to make spending commitments longer than 1 year.

The key benefits of the SAP Auto Scaling solution are:

  1. Customers will be fully utilizing the cloud native scaling features in an SAP environment. This translates to innovation and modernization of the SAP landscape.
  2. Cost savings of up to 50% for EC2 instances which host SAP Application Servers when comparing Auto Scaling to On-Demand rates.

How it works

SAP Auto Scaling is an automated solution to control the SAP Application Servers availability in a given environment. It checks Dialog Work Process utilization from the main ASCS (ABAP SAP Central Services) server and takes decisions on whether to scale in/out or not. It works with pre-installed and pre-configured AS (Application Servers) that are started/stopped according to the demand. Check below an architecture diagram showing the environment and overall characteristics:

Example state of environment under low utilization. Two AS are Running (1 and 2). Four AS are Stopped (3, 4, 5, and 6)

  1. From the environment above we can see a low utilization period. Two AS are Running (1 and 2). Four AS are Stopped (3, 4, 5, and 6).
  2. When traffic intensifies, it starts one of the Stopped instances as well as the SAP Application server inside that instance.
  3. It uses Dialog Work Processes count from the ASCS server to decide on when to scale up or down.
  4. Every time an Application Server initiates the Stop procedure, all GUI (Dialog) users are notified with a popup message (see example below) stating the server is going down and they have to save their work and login again. Important: this is valid only for ABAP. For Java servers there is no notification sent to users.

Popup message example: all GUI logged users are notified when a scale down event initiates on the server they are logged in

  • When stopping an AS, the solution uses the SAP Soft Shutdown command to ensure all batch jobs are finished before the server is stopped.
  • Can bring Application Servers up at pre scheduled times.
  • Allows registration of windows of time where scale up or down events must not occur.
  • Customers can mark specific Application Servers that should never be turned off, and allow the automation to work only on a specific set of servers.
  • Administrators are notified via email every time a scaling event is started.

Scale up decision tree

Below you have the decision tree performed to decide on whether to scale up. A similar one is performed to decide on scale down.

Decision flow of elements checked before starting a scale up event

Technical overview

Below are listed the main technical components of the solution, which are used to monitor and fine-tune the tool behavior.

Solution Design with the main AWS Building Blocks

Technical components

  1. A Lambda function controls the automation.
  2. The solution interacts with SAP Application Servers to Start or Stop them using AWS Systems Manager Documents.
  3. Auto Scaling data is stored on DynamoDB.
  4. CloudWatch Log Groups are used for logging, registration of events and auditing purposes.
  5. SNS notifies administrators via email every time a scaling event is started or some error happens.

Configuration parameters:

The application has a total of 15 parameters to fine-tune its behavior. Customers will work with AWS SAP ProServe to determine the optimal settings. Below are listed the most important ones:

  1. cooldown-scale-down-in-seconds – holds the number of seconds that should be waited between two scale down events. This helps preventing sudden changes in the environment.
  2. data-points-count-for-scaling-down – the quantity of consecutive measures to be observed as low-utilization periods before initiating a scale down event. Example: to avoid false positives and an unintended scale down event, configure this parameter for the application to wait for X number of data points captured telling the environment is underutilized before actually stopping a server.
  3. minimum-active-instances-count – hard control to tell the application to never scale down server below this number of EC2 instances.
  4. threshold-scale-down-in-percent – sets the percentage of Dialog Work Processes that have to be in idle state so the environment is considered as underutilized.

Limitations

With the SAP Auto Scaling feature, some limitations are expected on how the tool behaves. The most important ones are listed below:

  1. This solution does not create any EC2 instance on the AWS account. It operates using pre-installed and configured instances.
  2. It is recommended that SAP Logon groups and RFC server groups are evenly distributed, as this solution does not make any distinction between the Application Servers being started or stopped.
  3. It is recommended that batch jobs are set to run in a small number of Application Servers, ideally those servers that will never be turned off.
  4. Any memory buffers required for an Application Server to operate optimally are considered during the decision of scaling up/down for this automation.

Costs

There is a one-time ProServe engagement that installs this solution on customer environments and enables them to operate and extend the solution to additional landscapes if required. For the on-going operation, the costs on the AWS console are minimal as follows (these costs cover only the Auto Scaling solution itself, and doesn’t consider costs with the existing EC2 instances or new ones created for the Auto Scaling to handle):

  • Amazon CloudWatch Logs
  • AWS Lambda
  • AWS Systems Manager
  • Amazon DynamoDB
  • Amazon SNS
  • Total cost is estimated at USD 20 per month for Northern Virginia region.

Conclusion

This blog post introduces AWS ProServe’s SAP Auto Scaling solution, which enables automatic scaling of SAP Application Servers based on workload demands. The solution addresses the common challenge of infrastructure over-provisioning by monitoring Dialog Work Process utilization and automatically starting or stopping pre-configured Application Servers as needed. Key benefits include potential cost savings of up to 50% on EC2 instances and improved resource optimization. The system uses AWS services like Lambda, DynamoDB, and CloudWatch for implementation, with an estimated monthly cost of $20. The solution is particularly beneficial for medium to large enterprises experiencing variable workload patterns and seeking infrastructure cost optimization.

Call to Action

If you are looking for expert guidance and support to modernize your SAP operations on the cloud, the AWS Professional Services SAP Products & Solutions Practice can help. Please contact our AWS Professional Services team if you would like to learn more about how we can help.

To learn why thousands of customers choose AWS for SAP, visit our SAP page.

Read Entire Article