You can use the economical mode of pay-as-you-go Elastic Compute Service (ECS) instances and preemptible instances to retain instance data and configurations while reducing costs. After ECS instances are stopped in economical mode, you are no longer charged for computing resources (vCPUs and memory), system-assigned public IP addresses, and image licenses. You are still charged for resources such as system disks, data disks, elastic IP address (EIPs), and snapshots. This topic describes the limits, billing rules, and risks of the economical mode and how to enable this mode.
Limits
To use the economical mode, ECS instances must meet the following criteria:
The instances are deployed in virtual private clouds (VPCs).
You can migrate ECS instances from the classic network to VPCs. For more information, see Migrate ECS instances from the classic network to a VPC.
The instances are pay-as-you-go instances, including preemptible instances.
You can change the billing method of ECS instances from subscription to pay-as-you-go. For more information, see Change the billing method of an instance from subscription to pay-as-you-go.
The instance families of the instances are not equipped with local storage.
Instance families equipped with local storage do not support the economical mode, such as instance families that use local SSDs and big data instance families. For information about how to view instance types equipped with local storage, see the Local storage column of tables in Overview of instance families.
The instance families of the instances are not equipped with persistent memory.
Instance families equipped with persistent memory do not support the economical mode, such as re6p and re6p-redis instance families. For information about how to view instance types equipped with persistent memory, see the Persistent memory column of tables in Overview of instance families.
Billing after the economical mode is triggered
The following table describes whether billing for resources stops or continues after instances are stopped in economical mode.
Resource | Billing |
| These resources are recycled and no longer billed. |
| These resources are retained and continue being billed at the pay-as-you-go rates. For more information about billing, see Pay-as-you-go. |
Risks
When an instance enters the economical mode, its computing resources (vCPUs and memory), system-assigned public IP address, and public bandwidth that uses the pay-by-bandwidth metering method are recycled and no longer billed. This may cause the following issues:
After the computing resources (vCPUs and memory) are recycled, the instance may fail to be restarted due to insufficient resources or overdue payments in your account. If instance restart fails, try again later or change the instance to another instance type. For more information, see Change the instance type of a pay-as-you-go instance.
When the instance is restarted, a new system-assigned public IP address is automatically assigned to the instance. The new system-assigned public IP address may be different from the previous system-assigned public IP address that is recycled. The private IP address of the instance remains unchanged.
ImportantIf applications depend on the current system-assigned public IP address of the instance, we recommend that you stop the instance in standard mode or convert the system-assigned public IP address into an EIP. For information about how to convert a system-assigned public IP address into an EIP, see Convert the public IP address of an ECS instance in a VPC to an EIP.
When you create a preemptible instance and set a price limit, restarting the instance may fail if the market price exceeds the price limit.
If the instance is a burstable instance, the instance stops earning CPU credits and the CPU credit balance is cleared. When you restart the instance, the instance starts earning CPU credits again. For more information about CPU credits of burstable instances, see the CPU credits section in the "Overview" topic.
In some cases, you may need to stop and then restart an instance within a short period of time. To ensure that the instance can be restarted and run as expected, we recommend that you stop the instance in standard mode. For example, you need to restart an instance shortly after you stop the instance in the following scenarios:
Enable the economical mode
You can use one of the following methods to enable the economical mode for an ECS instance.
After you enable the default economical mode, ECS instances in your account can automatically stop in economical mode when payments become overdue. For more information, see the Enable the default economical mode section in this topic.
Enable the economical mode in the ECS console
When you stop an instance, set Stop Mode to Economical Mode and then click OK to stop the instance in economical mode.
Enable the economical mode by calling an API operation
Support for pay-as-you-go instances and preemptible instances: Call the StopInstance operation with the StoppedMode parameter set to StopCharging to stop an instance in economical mode.
Support only for preemptible instances: Call the RunInstances and CreateInstance operations with SpotInterruptionBehavior parameter set to Stop when you create a preemptible instance. The instance is in economical mode when it is interrupted.
View the stop mode of an instance
After you stop a pay-as-you-go instance, you can check whether the economical mode is triggered for the instance in the ECS console.
On the Instance page, find the stopped instance that you want to check and view the stop mode in the Status column.
Standard Mode: The economical mode is not triggered.
Economical Mode: The economical mode is triggered.
After you select Economical Mode to stop an instance, Standard Mode may be displayed in the Status column that corresponds to the instance when the instance is being stopped. We recommend that you recheck the stop mode of the instance later.
Enable the default economical mode
After you enable the default economical mode, Economical Mode is selected by default for all instances in your account that support the economical mode. You can configure the Stop Mode parameter to specify whether to stop instances in economical mode. For more information, see the Enable the economical mode section in this topic.
Log on to the ECS console.
In the Overview section of the Overview page, click Custom Settings.
Turn on Economical Mode.
In the message that appears, read the notes and click Enable Economical Mode in the lower part.
FAQ
References
You can use the scheduled startup and shutdown feature of CloudOps Orchestration Service (OOS) to batch manage the startup and shutdown time of multiple instances. You can use the feature together with the economical mode to reduce costs. For more information, see Scheduled startup and shutdown.