This topic describes public bandwidth types, billing methods for network usage, and examples on how to calculate network usage fees.

Overview

An Elastic Compute Service (ECS) instance can access the Internet by using one of the following resources:
  • Public IP address

    Public IP addresses are automatically assigned by the system. You are charged only for outbound public bandwidth and not for the use of public IP addresses. Two billing methods for network usage are available: pay-by-bandwidth and pay-by-traffic.

  • Elastic IP address (EIP)

    EIPs are public IP addresses that you can purchase and use individually. Only instances that are deployed in virtual private clouds (VPCs) support EIPs. For information about the billing details of EIPs, see Overview.

  • NAT gateway

    NAT gateways are Internet gateways that you can individually purchase. For information about the billing details of NAT gateways, see Billing overview.

This topic focuses on the billing methods for network usage and how to use public IP addresses to access the Internet. After an ECS instance is assigned a public IP address, you can use the instance to access the Internet and receive requests from the Internet. The following table describes the public bandwidth types involved.
Public bandwidth type Billed Description Example
Outbound bandwidth Yes The bandwidth for traffic from ECS instances to the Internet. FTP clients download resources from ECS instances by using public IP addresses.
Inbound bandwidth No The bandwidth for traffic from the Internet to ECS instances. FTP clients upload resources to ECS instances by using public IP addresses.
Note You are not charged for internal bandwidth usage. Within the same region, you are not charged for traffic generated when ECS instances communicate with each other or with other Alibaba Cloud services by using private IP addresses. For example, communication between Alibaba Cloud services within the same VPC is free of charge. If an ECS instance communicates with other Alibaba Cloud services over the Internet, you are charged for outbound bandwidth or traffic. For example, you are charged for communication between an instance within the China (Hangzhou) region and an instance within the China (Shanghai) region.

For information about the limits on the public bandwidth of ECS instances, see the "Public bandwidth limits" section of the Limits topic.

Billing methods for network usage

Two billing methods for network usage are available: pay-by-bandwidth and pay-by-traffic.
  • Pay-by-bandwidth: You are charged based on the bandwidth that you specify. The actual outbound bandwidth will not exceed the specified bandwidth.
  • Pay-by-traffic: a pay-as-you-go billing method. You are charged based on the actual traffic volume. You must configure a maximum bandwidth for outbound traffic to avoid out-of-control fees caused by outbound traffic bursts.
    Notice When the pay-by-traffic billing method is used for network usage, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios where demand outstrips resource supplies, these maximum bandwidths may be limited. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage.
Note You can also purchase a data transfer plan to offset the network traffic fees. For more information, see the Data Transfer Plan documentation.
The pricing of bandwidth varies based on regions. For more information, visit the Pricing tab of the Elastic Compute Service product page. The following table describes the billing methods for network usage and their relationship with the billing methods of ECS instances.
Billing method for network usage Billing method of ECS instances Billing rule for network usage
Pay-by-bandwidth Subscription You must pay upfront for the bandwidth and subscription duration that you purchase. You are charged for the bandwidth (in Mbit/s) based on a tiered billing model. Unit: USD/month.
  • 1 to 5 Mbit/s: Each bandwidth value corresponds to a different unit price.
  • ≥ 6 Mbit/s: You are billed at a flat rate per Mbit/s.
Pay-as-you-go Bandwidth bills are accurate to the second. The bills are generated on the hour every hour. You are charged for the bandwidth (in Mbit/s) based on a tiered billing model. Unit: USD/hour.
  • 1 to 5 Mbit/s: Each bandwidth value corresponds to a different unit price.
  • ≥ 6 Mbit/s: You are billed at a flat rate per Mbit/s.
Pay-by-traffic Subscription and pay-as-you-go The bills are generated on the hour every hour. You are charged based on the actual traffic volume (in GB). Unit: USD/GB.

Billing examples

The following table describes how you are billed for network usage. In the examples, instances within the China (Hangzhou) region are used.
Note The unit prices are for reference only, and the actual prices are displayed on the Pricing tab of the Elastic Compute Service page.
Billing method for network usage Billing method of ECS instances Example of billing conditions Fee (USD)
Pay-by-bandwidth Subscription
  • Usage period: one month
  • Bandwidth value: 2 Mbit/s
  • Unit price for 2 Mbit/s: USD 6.8 per month
1 × 6.8 = 6.8
  • Usage period: one month
  • Bandwidth value: 7 Mbit/s
  • Unit price for 5 Mbit/s: USD 17 per month
  • Unit price for ≥ 6 Mbit/s: USD 11.8 per Mbit/s per month
1 × [17 + (7 - 5) × 11.8] = 40.6
Pay-as-you-go
  • Usage period: one month
  • Bandwidth value: 2 Mbit/s
  • Unit price for 2 Mbit/s: USD 0.012 per hour
24 × 30 × 0.012 = 8.64
  • Usage period: one month
  • Bandwidth value: 7 Mbit/s
  • Unit price for 5 Mbit/s: USD 0.03 per hour
  • Unit price for ≥ 6 Mbit/s: USD 0.021 per Mbit/s per hour
24 × 30 × [0.03 + (7 - 5) × 0.021] = 51.84
Pay-by-traffic Subscription and pay-as-you-go
  • Traffic volume: 1 GB
  • Unit price: USD 0.123 per GB
  • Usage duration: N/A. You are charged based on the actual traffic volume.
1 × 0.123 = 0.123

References

You can change the billing method for network usage from pay-by-bandwidth to pay-by-traffic or from pay-by-traffic to pay-by-bandwidth. For more information, see Change the billing method for network usage.

If the current public bandwidth does not meet your business requirements, you can upgrade or downgrade the public bandwidth. For more information, see Overview of instance upgrade and downgrade.