CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
julia-vieira
Associate
Associate
861

Introduction

When facing performance issues in SAP Commerce Cloud, increasing system resources is not always the best solution—unless a clear infrastructural bottleneck is identified. Instead, autoscaling can help dynamically manage workloads, ensuring optimal performance without overprovisioning resources.

For anticipated high-traffic events such as promotions or seasonal sales, it is recommended to contact SAP Support in advance. This allows for proactive resource scaling to handle increased demand efficiently.

What is Autoscaling?

Autoscaling dynamically adjusts system resources based on demand. This ensures that services remain responsive during peak times while minimizing resource usage when demand decreases.

Where is Autoscaling Enabled?

By default, autoscaling is enabled in production environments for the following services:

  • Storefront and API
  • Background Processing
  • Apache Ingress
  • Backoffice

If necessary, SAP Product Support can disable autoscaling upon request. When autoscaling is turned off, the system automatically sets a base replica count equal to the current number of running replicas, preventing service interruptions.

Tracking Autoscaling Events

To monitor autoscaling activity, users can track scaling events in Dynatrace’s Events panel.

Autoscaling Strategies by Service

Storefront and API

  • Strategy: Autoscaling is triggered based on CPU consumption. The system monitors CPU usage at different intervals:
  • Every 1 minute to check for scaling up
  • Every 30 minutes to check for scaling down

Thresholds:

  • Lower limit: 30% CPU usage
  • Upper limit: 60% CPU usage

Replica Count:

  • Minimum: 3 replicas
  • Maximum: Current number of replicas + 2

Background Processing

  • Strategy: Scaling is triggered by the number of tasks queued in the Task Service.
  • Every 1 minute, the system checks if the task queue exceeds the threshold, scaling up if necessary.
  • Every 30 minutes, the system checks for scale-down conditions, removing replicas incrementally.

Thresholds:

  • Lower limit: 1,000 queued tasks
  • Upper limit: 50,000 queued tasks

Replica Count:

  • Minimum: 2 replicas
  • Maximum: Current number of replicas + 3
  • Scaling Step: 1 (scales up or down one replica at a time)

Apache Ingress

  • Strategy: Scaling is determined based on CPU usage at 15-second intervals.
  • Every 1 minute, the system checks for scale-up conditions.
  • Every 30 minutes, the system checks for scale-down conditions.

Replica Count:

  • Minimum: 2 replicas
  • Maximum: 5 replicas
  • Scaling Step: 1 (can be adjusted)

Note: Applies only to standard Apache. VPN and NAT configurations are not covered.

Backoffice

  • Strategy: Scaling is triggered by CPU usage, similar to Storefront and API.
  • Every 1 minute, the system checks for scale-up conditions.
  • Every 30 minutes, the system checks for scale-down conditions.

Thresholds:

  • Lower limit: 30% CPU usage
  • Upper limit: 60% CPU usage

Replica Count:

  • Minimum: 3 replicas
  • Maximum: Current number of replicas + 2

Configurable Autoscaling Parameters
Storefront, API, and Backoffice
Scaling Strategy:

  • MIN_MAX_REPLICAS (scale up to max at once, scale down one by one)
  • INCREMENT_REPLICAS (scale up/down incrementally)
  • CPU Thresholds: 0% - 100%
  • Replica Limits: Min and max replicas can be set
  • Scaling Step (for incremental scaling): 1 or more
  • Cooldown Period: Customizable for both scale-up and scale-down events

Background Processing

  • Scaling Strategy: INCREMENT_REPLICAS (fixed strategy)
  • Queue Depth Thresholds: 0 - 200,000 tasks
  • Replica Limits: Min and max replicas can be set
  • Scaling Step: 1 or more
  • Cooldown Period: Configurable for both scale-up and scale-down events

Apache Ingress

  • Scaling Strategy: INCREMENT_REPLICAS (fixed strategy)
  • CPU Thresholds: 1% - 100%
  • Replica Limits: Min and max replicas can be set
  • Scaling Step: Adjustable, including an unlimited option (set to 0)
  • Cooldown Period: Adjustable between 1 and 30 minutes

Conclusion
Autoscaling is a powerful tool for optimizing performance in SAP Commerce Cloud. By automatically adjusting resources based on predefined thresholds, businesses can ensure stability, responsiveness, and cost-efficiency. However, understanding and configuring autoscaling properly is essential to get the best results.

For critical events, businesses should proactively engage with SAP Support to ensure that their infrastructure is ready for anticipated load increases.

By leveraging autoscaling effectively, companies can maintain seamless operations, even during peak demand periods, while optimizing resource utilization.

2 Comments
Sohail_Jahangir
Product and Topic Expert
Product and Topic Expert
0 Kudos

In Windows when we right click to see the task manager ,we see processes within the same .

So the lower limit of 1000 tasks means in Windows Task Manager the 1000 apps running right ,and this takes place in the VM where Commerce Cloud is hosted ?

geffchang
Active Contributor
0 Kudos

How can I check if autoscaling is enabled/disabled in one of the Production services? SAP told my project that one of our Production services has disabled autoscaling. Can I confirm this myself in Cloud Portal or HAC? If yes, how? Or, do I need to ask SAP to get this information?