Economical mode is a cost-saving feature for stopped Elastic Compute Service (ECS) pay-as-you-go and spot instances. It retains data and configurations while reducing costs. You stop paying for computing resources, system-assigned public IP addresses, and image licenses, but still charge for disks, elastic IP address (EIPs), and snapshots. This topic describes how to stop an instance in economical mode.
When to use economical mode
Cost saving
For an instance stopped in economical mode, the following resources are recycled and no longer billed:
Computing resources, such as vCPUs, memory, GPUs, and FPGAs
System-assigned public IP addresses
Image licenses
The following resources are retained and continue being billed at the pay-as-you-go rates: system disks, data disks, EIPs, and snapshots.
Requirements
To use economical mode, an ECS instance and its family must meet the following criteria:
Deployment: virtual private cloud (VPC). You can migrate ECS instances from the classic network to VPCs.
Billing method: pay-as-you-go.
Instance families NOT supported: those who have local storage or persistent memory, including all instance families with local SSDs (i series), all big data instance families (d series), and the gn5, re6p, re6p-redis, and ebmre6p instance families.
Considerations
Some resources are recycled and no longer billed, potentially causing:
Restart issues:
The instance may fail to be restarted due to insufficient computing resources in the zone, or overdue payments in your account. Try restarting the instance later to get available resources. Alternatively, you can change the instance to an instance type that has available resources.
If a price limit was set on the spot instance during its creation, restarting the instance may fail if the market price exceeds the price limit.
Public IP changes: Your previous system-assigned public IP address that was recycled may no longer be available. New public IP address is assigned on instance restart. The private IP address remains unchanged.
CPU credits: For a burstable instance, it stops earning CPU credits and the CPU credit balance is cleared. When you restart the instance, it starts earning CPU credits again.
When to use standard mode
In the following scenarios, standard mode is more suitable:
If your applications depend on the instance's current system-assigned public IP address, stop the instance in Standard Mode or convert the public IP address to an EIP.
If you need to restart an instance shortly after stopping it, such as in the following scenarios, then it's better to choose Standard Mode:
How to stop instances in economical mode
There are several ways to stop an instance in economical mode: through the ECS console, using Alibaba Cloud CLI, through Alibaba Cloud Client, and by calling an API operation.
In addition, you can set all instances to stop in Economical Mode by default within VPCs.
Stop an instance in economical mode
ECS console
In the Actions column on the right of the Instance page, click Stop.
Set the Stop Mode to Economical Mode, then click Confirm.
Alibaba Cloud Client
In the client home page, choose ECS to go to instance list page.
Find the target instance and click Actions in the Actions column on the right.
Choose Change Instance Status and then click Stop Instance.
On the Stop Instance panel, select StopCharging to enable economical mode.
Alibaba Cloud CLI
To stop an instance and enable economical mode, run a command to call the StopInstance operation, setting the StoppedMode
parameter as StopCharging
.
Refer to the following example to stop an instance that resides in the Singapore region:
aliyun ecs StopInstance \
--RegionId ap-southeast-1 \
--InstanceId i-t4n5xxxxxxxxxxx \
--StoppedMode StopCharging \
--ForceStop false \
--DryRun false
API
Support for pay-as-you-go instances and spot instances: Call the StopInstance operation with the StoppedMode parameter set to StopCharging to stop an instance in economical mode.
Support only for spot instances: Call the RunInstances and CreateInstance operations with SpotInterruptionBehavior parameter set to Stop when you create a spot instance. The instance is in economical mode when it is interrupted.
Stop instances in economical mode by default
You can set instances to stop in Economical Mode by default. This can be done for all instances within VPCs in your account that support this mode.
When you stop an instance in the ECS console, you will see that Economical Mode is already selected for the Stop Mode parameter.
If you use Alibaba Cloud CLI to stop an instance, there is no need to add the
StoppedMode
parameter because the default value is alreadyStopCharging
.
Even when economical mode is set by default, stopping an instance directly from within its operating system (shutting down Windows server through RDP or Linux server through SSH) does not automatically trigger economical mode.
In such cases, trigger economical mode in one of the ways mentioned in How to stop instances in economical mode.
If you have overdue payments, instances will be stopped in economical mode.
Go to ECS console - Overview.
In the upper-right corner of the Overview tab, click Custom Settings.
Turn on Economical Mode.
In the message that appears, read the notes and click Enable Economical Mode in the lower part.
View the stop mode of an instance
After you stop a pay-as-you-go instance, the ECS console shows whether economical mode has been triggered for it.
On the Instance page, find the stopped instance that you want to check, and view the stop mode in the Status column.
After you set an instance to stop in Economical Mode, while it is stopping, the Status column may still show it as being in Standard Mode. Wait until it has fully stopped, then check it again.
FAQs
References
Spot Instances can be set to automatically Stop in Economical Mode when interrupted. For more information, see Create a spot instance.
Use the scheduled startup and shutdown feature of CloudOps Orchestration Service (OOS) to batch manage the startup and shutdown times of multiple instances. Use this feature in combination with economical mode to further reduce costs.