All Products
Search
Document Center

ApsaraMQ for Kafka:Elasticity policy

Last Updated:Apr 07, 2026

This topic describes the elasticity of serverless instances, including scheduled policies and other important considerations.

Prerequisites

A serverless Message Queue for Apache Kafka instance is deployed and in the Running state.

Elasticity

The Standard and Professional editions of serverless Message Queue for Apache Kafka instances offer elastic scaling to handle fluctuating traffic. You can adjust the reserved production and consumption capacity by scaling up or down.

Edition

Elastic limit

Example

Basic

Provides a 99.9% service level agreement (SLA), which is slightly lower than that of the Standard and Professional editions. The cluster uses a higher proportion of low-cost resources, such as HDDs, OSS, and Spot Instances. This edition does not support lossless auto-elasticity and requires manual scaling. It is recommended for testing or business scenarios with stable traffic.

For mission-critical applications, we recommend the Standard or Professional edition.

Reserved production capacity is the message production throughput of a Message Queue for Apache Kafka cluster, measured in MB/s.

By default, a cluster has three fixed replicas, and the production capacity is distributed evenly among them.

Elastic limit for the Standard edition:

  • Reserved capacity in (0, 512] MB/s: The elastic limit is 2x the reserved capacity.

  • Reserved capacity in (512, 5,120] MB/s: The elastic limit is 2x the reserved capacity.

  • Reserved capacity in (5,120, 10,240] MB/s: The elastic limit is 1.5x the reserved capacity.

  • Reserved capacity greater than 10,240 MB/s: The elastic limit is 1.2x the reserved capacity.

Elastic limit for the Professional edition:

  • Reserved capacity in (0, 512] MB/s: The elastic limit is 1 GB/s.

  • Reserved capacity in (512, 5,120] MB/s: The elastic limit is 2x the reserved capacity.

  • Reserved capacity in (5,120, 10,240] MB/s: The elastic limit is 1.5x the reserved capacity.

  • Reserved capacity greater than 10,240 MB/s: The elastic limit is 1.2x the reserved capacity.

Examples:

  • Basic edition: If your steady-state production traffic is 600 MB/s and peak traffic does not exceed 1,200 MB/s, you must reserve for the peak. The required reserved production capacity is 1,200 MB/s × 3 (replicas) = 3,600 MB/s.

  • Standard or Professional edition: If your steady-state production traffic is 600 MB/s and peak traffic does not exceed 1,200 MB/s, you can leverage elasticity for peaks. We recommend a reserved production capacity of 600 MB/s × 3 (replicas) = 1,800 MB/s.

  • Standard or Professional edition: If your steady-state production traffic is 600 MB/s and peak traffic reaches 1,500 MB/s, we recommend a reserved production capacity of 2,250 MB/s, calculated as (1,500 × 3) / 2.

  • Professional edition: If the reserved production capacity is 60 MB/s, the production throughput is capped at 1,024 MB/s. If the reserved production capacity is 600 MB/s, the production throughput is capped at 1,200 MB/s. Production traffic that exceeds these limits is throttled.

Use the ApsaraMQ for Kafka serverless price calculator to estimate costs:

Price Calculator for Serverless Message Queue for Apache Kafka

Standard

Provides a 99.95% high-availability SLA. It supports lossless auto-elasticity and scheduled elasticity. This edition is recommended for production environments.

Professional

Provides a 99.99% high-availability SLA with 3-AZ disaster recovery. It offers higher elasticity for smaller reserved capacities, making it the recommended enterprise-grade edition.

Scheduled policy

Target items

  • A scheduled elasticity policy changes the reserved production and consumption capacity on a schedule. If traffic is expected to peak above the elastic limit, we recommend configuring a scheduled task to increase capacity for these temporary spikes.

  • The Standard and Professional editions support scheduled elasticity policies. For more information about elastic limits, see Elasticity.

Impact

  • This can cause clients to briefly disconnect and reconnect, which triggers load balancing and may result in a few errors. To ensure message delivery, implement a retry mechanism on your clients.

  • The overall service remains available during the scaling operation.

Effective time

  • The service begins scaling before the scheduled start time to ensure the new capacity is ready when the period begins. Therefore, set tasks with sufficient lead time for the scaling operation to complete.

  • The service automatically scales down after the effective period ends.

  • To prevent rapid, repeated scaling, consecutive scheduled tasks must be at least 60 minutes apart.

  • If a task is created for a time that has already passed, a non-recurring task will not run, and a recurring task will skip that scheduled run.

  • When you manually scale up an instance, the new capacity must exceed that of any active scheduled policy. This action automatically disables any scheduled policy with a lower capacity target.

Create a scheduled policy

  1. Log on to the ApsaraMQ for Kafka console. In the Resource Distribution section of the Overview page, select the region where the ApsaraMQ for Kafka instance that you want to manage resides.

  2. On the Instances page, click the name of the instance that you want to manage.

  3. On the Instance Details page, click the Elasticity Policy tab.

  4. In the Scheduled Elasticity Policy section, click Add Scheduled Task. In the Create Scheduled Elasticity Policy panel, configure the following parameters and click OK.

    • Policy Name: Set a name for the policy.

    • Reserved Production Capacity: The target production capacity for the scheduled period.

    • Reserved Consumption Capacity: The target consumption capacity for the scheduled period.

    • Recurrence Rule

      • Non-recurring: The task runs once at a specified time. The start time must be at least 1 hour in the future and within the next 7 days. The task duration must be between 30 minutes and 7 days.

      • Daily: The task runs daily at a specified time. The task duration must be between 30 minutes and 12 hours.

      • Weekly: The task runs at a specified time on the selected days of the week. The task duration must be between 30 minutes and 12 hours.

    • Effective Period: Set the effective period for the reserved capacity according to the duration range specified in the recurrence rule.

      Important

      To allow scaling operations to complete, consecutive scheduled policies must be at least 60 minutes apart.

    • Enabled: Activates the policy immediately after it is created.

    After the policy is created, you can view its details on the Elasticity Policy tab of the Instance Details page. Details include the reserved production capacity, reserved consumption capacity, effective period, and estimated scale-up time.

Enable a scheduled policy

  1. In the Scheduled Elasticity Policy section, view the list of scheduled tasks.

  2. In the row for the target policy, turn on the image switch in the Enabled column.

    After the scheduled policy is enabled, you can view the projected reserved capacity for production and consumption for a future period (1, 2, 3, or 7 days) in the Policy Preview area.image

Disable or delete a scheduled policy

In the Scheduled Elasticity Policy section, view the list of scheduled tasks.

  • To disable a policy, find it in the list and turn off the image switch in the Enabled column.

  • To delete a scheduled policy: In the Actions column for the target policy, click Delete.