This topic describes the billing rules and billing methods for network usage, and the network usage fees generated for Elastic Compute Service (ECS) instances that use auto-assigned public IPv4 addresses to access the Internet. This topic also provides examples on how to calculate network usage fees.
This topic describes only the billing rules for IPv4 network usage. For information about the billing rules for IPv6 network usage, see Billing rules.
Overview
An ECS instance can use an auto-assigned public IP address, an elastic IP address (EIP), or a network address translation (NAT) gateway to access the Internet. The billable items and billing methods for network usage vary based on the resource that is used by the instance to access the Internet.
Auto-assigned public IP address
If an ECS instance is automatically assigned a public IPv4 address and uses the IPv4 address to access the Internet, you are charged for outbound public bandwidth or outbound traffic to the Internet. You are not charged for the auto-assigned public IPv4 address. For more information, see the Billing for network usage when an auto-assigned public IP address is used for Internet access section of this topic.
EIP
If an EIP is associated with an ECS instance, the instance can use the EIP to access the Internet. EIPs are public IP addresses that you can separately purchase and use. You can associate EIPs only with ECS instances that reside in virtual private clouds (VPCs). For information about the billing of EIPs, see Billing overview.
NAT gateway
If an ECS instance and a NAT gateway on which source network address translation (SNAT) entries are configured reside in the same VPC, the instance can use the NAT gateway to access the Internet. NAT gateways are Internet gateways that you can separately purchase. For information about the billing of NAT gateways, see Billing of Internet NAT gateways.
Billing for network usage when an auto-assigned public IP address is used for Internet access
If you select Assign Public IPv4 Address when you create an ECS instance, a public IP address is automatically assigned to allow the instance to access the Internet. When the instance uses the auto-assigned public IP address to access the Internet, you are charged for outbound public bandwidth or outbound traffic to the Internet.
Billable items
After a public IP address is automatically assigned to an ECS instance, the instance can access the Internet and receive requests from the Internet. You are charged for outbound public bandwidth or outbound traffic to the Internet.
Outbound public bandwidth (chargeable): The bandwidth for traffic from ECS instances to the Internet. For example, outbound public bandwidth is used by File Transfer Protocol (FTP) clients to download resources from ECS instances that use auto-assigned public IP addresses.
Inbound public bandwidth (free of charge): The bandwidth for traffic from the Internet to ECS instances. For example, inbound public bandwidth is used by FTP clients to upload resources to ECS instances that use auto-assigned public IP addresses.
You are not charged for internal bandwidth. If ECS instances and other Alibaba Cloud services are deployed in the same VPC, you are not charged for the traffic that is generated when the instances communicate with each other or with the Alibaba Cloud services by using private IP addresses.
If an ECS instance communicates with another ECS instance or with an Alibaba Cloud service over the Internet, you are charged for outbound public bandwidth or outbound traffic to the Internet. For example, you are charged for network usage when an ECS instance located in the China (Hangzhou) region communicates with an ECS instance located in the China (Shanghai) region over the Internet.
Billing methods for network usage
Two billing methods for network usage are available when ECS instances use auto-assigned public IP addresses for Internet access: pay-by-bandwidth and pay-by-traffic. The following table describes the different scenarios for which the two billing methods for network usage are suitable and the billing rules for each billing method.
If the pay-by-traffic billing method is used, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios in which demand exceeds resource supplies, the maximum bandwidths may not be reached. If you want guaranteed bandwidths for your instances, use the pay-by-bandwidth billing method for network usage.
Item | Pay-by-bandwidth | Pay-by-traffic | |
Scenario | You are charged based on a specific bandwidth value. The actual outbound public bandwidth is capped at the specified bandwidth value.
| You are charged based on the actual traffic volume. To prevent excessive fees that are caused by traffic bursts, you can specify a maximum bandwidth for outbound traffic.
| |
Charging method | Network usage fees are included in ECS instance fees. | Network usage fees are not included in ECS instance fees. | |
Billing rule | Subscription instance | The following billing rules apply:
| The following billing rules apply:
Note CDT provides an efficient and cost-effective method for managing public bandwidth expenses. CDT supports flexible billing, free data transfer quota, tiered pricing, and unified billing for multiple Alibaba Cloud services. Compared with the pay-by-traffic billing method, the CDT billing method provides specific discounts. For more information, see What is CDT?
|
Pay-as-you-go instance | The following billing rules apply:
|
Pricing
The pricing of public bandwidth varies based on the region. For information about the price schedule of public bandwidth, go to the Pricing tab of the ECS product page.
Billing examples
The following table describes how you are charged for network usage. In the examples, ECS instances in the China (Hangzhou) region are used.
The unit prices are provided for reference only. The prices on the Pricing tab of the ECS product page prevail.
Billing method of ECS instances | Billing method for network usage | Example of billing conditions | Network usage fee (USD) |
Subscription | Pay-by-bandwidth |
| The fee is calculated by using the following formula: Fee = Unit price of public bandwidth × Subscription duration. In this example, the fee is USD 6.8: 6.8 × 1 = 6.8. |
|
| ||
Pay-by-traffic |
| The fee is calculated by using the following formula: Fee = Unit price × Traffic volume. In this example, the fee is USD 0.123: 0.123 × 1 = 0.123. | |
Pay-as-you-go | Pay-by-bandwidth |
| The fee is calculated by using the following formula: Fee = Unit price of public bandwidth × Usage duration. In this example, the fee is USD 8.64: 0.012 × (24 × 30) = 8.64. |
|
| ||
Pay-by-traffic |
| The fee is calculated by using the following formula: Fee = Unit price × Traffic volume. In this example, the fee is USD 0.123: 0.123 × 1 = 0.123. |
Activate CDT to offset network usage fees
You can use one of the following methods to activate the CDT service to offset the pay-by-traffic network usage fees.
CDT is an out-of-the-box service that requires activation only once. After CDT is activated, the network usage fees of all existing and new ECS instances with CDT billing enabled are automatically charged and billed by using CDT.
You are not charged for the activation of the CDT service. For information about the billing of CDT, see Billing overview.
After CDT is activated, the public bandwidth billing method cannot be changed to pay-by-traffic.
Activate the CDT service in the Cloud Data Transfer console. For more information, see Getting started.
When you create an instance on the ECS instance buy page, select Upgrade to CDT for Data Transfer Billing in the Bandwidth Billing Method section. For information about how to create an instance, see Create an instance on the Custom Launch tab.
References
If the current billing method for network usage does not meet your business requirements, you can change the billing method. For more information, see Change the billing method for network usage.
If the current public bandwidth does not meet your business requirements, you can change the public bandwidth configurations. For more information, see the "Change the billing method for network usage" section in Overview of instance configuration changes.