Alibaba Cloud Elastic Compute Service (ECS) provides two billing methods for network usage: pay-by-bandwidth and pay-by-traffic. If the bandwidth needs of your instance fluctuate, you can change its billing method for network usage from pay-by-bandwidth to pay-by-traffic and enforce an upper limit on bandwidth to suit your business needs and reduce costs. This topic describes the billing methods for network usage of ECS instances, how to configure public bandwidth in different scenarios, and how to change billing methods for network usage to increase the upper bandwidth limit.

Prerequisites

Before you change the billing method for network usage of a subscription instance from pay-by-bandwidth to pay-by-traffic, make sure that your account has been granted the privilege to perform configuration downgrades.
Note You can click Privileges on the Overview page in the ECS console to go to the Privileges and Quotas page and check whether your account has been granted the privilege to perform configuration downgrades.

Background information

The following table describes the pay-by-bandwidth and pay-by-traffic billing methods for network usage and the scenarios to which these billing methods are applicable.
Scenario Billing method for network usage Bandwidth type Billing
Scenarios that require stable low-cost bandwidth Pay-by-bandwidth For an instance that uses this billing method for network usage, you must specify an outbound bandwidth in Mbit/s. The actual outbound bandwidth used by the instance is capped at your specified bandwidth. You are charged for the specified bandwidth based on a tiered billing model. The bandwidth fees are built into your instance fees. For more information, see Public bandwidth.
Scenarios that have highly variable bandwidth needs, such as those which have low traffic usage with occasional traffic spikes Pay-by-traffic For an instance that uses this billing method for network usage, you must specify a maximum outbound bandwidth (Peak Bandwidth) of up to 100 Mbit/s. To prevent out-of-control fees caused by bursts in traffic, specify a maximum bandwidth for the instance. The actual outbound bandwidth that can be used by the instance is capped at your specified maximum bandwidth.
Note Public bandwidth limits are determined based on instance billing methods and billing methods for network usage. For more information, see Public bandwidth limits.
You are charged for the actual volume (in GB) of outbound traffic to the Internet on a pay-as-you-go basis. These bills are generated every hour on the hour. For more information, see Public bandwidth.
The following table describes how to configure public bandwidth in different scenarios.
Scenario Configuration method Procedure
A public IP address is required to access the Internet. Assign a public IP address and configure public bandwidth.
The current billing method for network usage does not meet your business needs. Change the billing method for network usage. For more information, see Change the billing method for network usage.
The specified bandwidth does not suit your business needs. Modify the public bandwidth configurations.
The bandwidth of an elastic IP address (EIP) does not suit your business needs. Change the bandwidth of the EIP. For more information, see Modify the bandwidth of an EIP.

For information about some frequently asked questions about public bandwidth, see Network FAQ.

The following sections describe how to configure public bandwidth when you create an instance and how to change the billing method for network usage to enforce an upper bandwidth limit.

Step 1: Assign a public IP address and configure public bandwidth when you create an ECS instance

Create an ECS instance, assign a public IP address, and configure the pay-by-bandwidth billing method for network usage.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. On the Instances page, click Create Instance.
  5. Configure parameters in the instance creation wizard.
    For information about the steps and parameters in the wizard, see Create an instance by using the wizard.
    In the Networking step, complete the following settings:
    • Network Type: Select VPC.
      • Select an existing virtual private cloud (VPC) and an existing vSwitch from the drop-down lists.
      • You can select Specify Private IP Address to specify a private IP address.
    • Public IP Address: Select Assign Public IPv4 Address.
    • Bandwidth Billing: Select Pay-By-Bandwidth.
    • Bandwidth: Specify a bandwidth. Unit: Mbit/s. Example: 10. You are charged based on your specified bandwidth. The actual outbound bandwidth is capped at your specified bandwidth.
    • Security Group: Select a security group to control inbound and outbound traffic for the instance.
    • ENI: Primary elastic network interfaces (ENIs) cannot be unbound from instances but can be created and released only along with instances. To create a secondary ENI when you create an instance, click the Add icon and select a vSwitch with which to associate the secondary ENI.
    • Optional:IPv6: Assign an IPv6 address to the instance based on your business needs.
    For more information about these parameters, see the "Step 2: Complete the settings in the Networking step" of Step 2: Complete the settings in the Networking step.
    Networking step
    After the instance is created, the specified bandwidth is displayed in the Specifications column corresponding to the instance on the Instances page. Specified bandwidth

Step 2: Change the billing method for network usage from pay-by-bandwidth to pay-by-traffic

If your instance has fluctuating bandwidth needs and requires an upper bandwidth limit, you can change the billing method for network usage of the instance to pay-by-traffic and specify a maximum bandwidth to prevent out-of-control fees caused by bursts in traffic.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance for which you want to change the billing method for network usage. Then, perform different operations to go to the configuration page based on the billing method of the instance.
    • Subscription
      1. Find the subscription instance for which you want to change the billing method for network usage. Click Upgrade/Downgrade in the Actions column.
      2. In the dialog box that appears, choose Downgrade > Bandwidth Configuration.
      3. Click Continue.
    • Pay-as-you-go

      Find the pay-as-you-go instance for which you want to change the billing method for network usage and choose More > Configuration Change > Change Pay-as-you-go Instance Bandwidth in the Actions column.

  5. On the Change Bandwidth page, find the Bandwidth section, select Pay-By-Traffic, and then specify a maximum bandwidth. Unit: Mbit/s. Example: 50.
    You are charged based on the actual traffic volume. The actual outbound bandwidth is capped at the specified maximum bandwidth to prevent out-of-control fees caused by bursts in traffic. Change the billing method for network usage
  6. Read the notes. Read and select ECS Service Terms.
  7. Confirm the configuration costs, click Confirm in the lower part of the page, and then perform the subsequent operations as instructed on the page.
    After the billing method for network usage of the instance is changed, the new configurations take effect immediately. The specified maximum bandwidth is displayed in the Specifications column corresponding to the instance on the Instances page. Example: 50 Mbit/s. Maximum bandwidth
    Note For information about how to change the billing method for network usage of an instance associated with an EIP, see Modify the bandwidth of an EIP.