If your Message Queue for Apache Kafka instance consumes significantly less public traffic or uses far fewer partitions than purchased, you can downgrade the public traffic, partitions, traffic specification, and disk capacity to reduce costs.
Prerequisites
-
Downgrading the disk capacity and traffic specification of an instance is a feature currently in canary release.
-
To ensure stability, avoid downgrading the traffic specification and disk capacity by a large margin at the same time.
-
The instance is in the Running or Not Deployed state.
-
For an instance with public access enabled, the public traffic must be greater than the minimum bandwidth of 3 Mbps.
-
There are no ongoing topic traffic rebalancing tasks on the instance.
-
The target number of partitions must be greater than the number of partitions currently in use.
-
The target traffic specification and disk capacity must be at least 1.3 times the current usage.
Usage notes
Downgrading an instance configuration involves risks such as broker restarts, traffic throttling, and write prohibition. For a Serverless instance, auto scaling may also be suspended.
Before you downgrade the traffic specification and disk capacity, review your monitoring data to understand peak usage over a recent period. We recommend reviewing data from the last seven days. Carefully evaluate the target values based on peak usage. An improper assessment can affect the Service Level Agreement (SLA) of your online services. For more information, see View CloudMonitor data.
-
Restart risk: Downgrading an instance configuration triggers a rolling restart of the cluster, which may result in the following:
-
Clients will experience brief disconnections and reconnections, which may result in a few errors.
-
Messages sent before the downgrade are not lost. If messages fail to send during the process, we recommend configuring a retry mechanism on your client.
-
The downgrade process takes about 30 minutes. A larger reduction in disk capacity takes more time. The service is not interrupted, but messages may be reordered during consumption. We recommend performing this operation during off-peak hours to minimize business impact.
-
-
Traffic throttling risk: If the target traffic specification is set too low, the following issues can occur:
-
If the target traffic specification is less than 1.3 times the current traffic usage, your instance may be subject to traffic throttling during peak hours.
-
If the target traffic specification is lower than the current traffic usage, traffic throttling is triggered immediately.
-
For an instance with a high number of queries per second (QPS), downgrading the traffic specification can cause request backlogs and increase single-request latency, which may exceed the
SESSION_TIMEOUT_MS_CONFIGvalue configured in your Kafka client.NoteIn a single downgrade operation, we recommend reducing the traffic specification by no more than 50% of the purchased specification. Monitor your services for stability before further downgrades. For example, if you purchased an instance with the
alikafka.hw.30xlargetraffic specification and want to downgrade toalikafka.hw.9xlarge, first downgrade toalikafka.hw.16xlarge. After you confirm that your business is stable, you can then downgrade toalikafka.hw.9xlarge.
-
-
Write prohibition risk: If the target disk capacity is set too low, the following issues can occur:
-
For a high-traffic instance, if the target disk capacity is less than 1.3 times the current disk usage, the disk may fill up quickly. This can lead to premature data deletion and write prohibition.
-
If the target disk capacity is lower than the current disk usage, write prohibition is triggered.
-
-
Data risk: With high disk usage and sustained high-traffic writes, premature data deletion or truncation may occur to ensure stability.
-
Stability risk: Because cloud disks do not natively support capacity reduction, Message Queue for Apache Kafka consumes extra cluster CPU and disk I/O to perform a disk capacity downgrade. For an instance with high resource utilization, this may pose stability risks. Before you proceed, check for and resolve any existing risks to ensure the instance is in a healthy state.
-
Suspended auto scaling risk: For a Serverless instance, auto scaling is suspended during configuration changes such as upgrades or downgrades. Perform this operation when your business workload is stable.
Use cases and risks
|
Scenario |
Risk |
|
Downgrading the traffic specification of a non-Serverless Message Queue for Apache Kafka instance when its traffic usage is consistently lower than the purchased specification. |
|
|
Decreasing the disk capacity of a non-Serverless Message Queue for Apache Kafka instance when its disk usage is low. |
Data writes to your instance may be prohibited. For more information, see the write prohibition risk section in Usage notes. |
|
Changing the number of partitions or topics for a non-Serverless Message Queue for Apache Kafka instance. The new number must not be less than the number currently in use. Note
For instances purchased on or after August 26, 2022, you can only change the number of partitions. For instances purchased before this date, you can change the number of topics. |
None. |
|
Reducing the public bandwidth of a non-Serverless Message Queue for Apache Kafka instance. |
None. |
|
Downgrading the minimum billable usage specification of a Message Queue for Apache Kafka Serverless instance. |
Auto scaling is suspended after the downgrade. |
Procedure
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.
On the Instances page, click the name of the instance that you want to manage.
-
On the Instance Details page, click Downgrade in the upper-right corner of the Overview section.
-
In the downgrade panel, configure Public Traffic, Partitions, Traffic Specification, and Disk Capacity, read and agree to the terms of service, and then click Buy Now.
Important-
To prevent network restrictions caused by insufficient bandwidth, Message Queue for Apache Kafka estimates an optimal bandwidth based on your selected instance specification. Follow the on-screen instructions to purchase public traffic in specified multiples.
-
The new number of partitions cannot be less than the number of partitions currently in use.
-
If the cluster has high resource utilization such as CPU usage, the downgrade page limits traffic specification downgrades to ensure stability.
-
For Professional Edition (High Write) and Professional Edition (High Read) instances, you can only downgrade instances with traffic specifications lower than alikafka.hw.60xlarge and alikafka.hr.60xlarge, respectively. The feature to downgrade alikafka.hw.60xlarge, alikafka.hr.60xlarge, and higher specifications is in canary release. To use this feature, submit a ticket.
-
If disk capacity is not changed during the downgrade, the process takes about 30 minutes for specifications up to and including alikafka.hr.30xlarge or alikafka.hw.30xlarge, and over one hour for specifications of alikafka.hr.60xlarge, alikafka.hw.60xlarge, and higher. Generally, the duration increases with the instance specification and the number of topics. If disk capacity is also being downgraded, the process takes longer because historical data must be copied. The time required is directly proportional to the amount of disk data.
In the Basic Information section of the Instance Details page, the instance Status changes to Upgrading. After the downgrade completes, the downgraded specification is displayed.
-