All Products
Search
Document Center

Elastic Compute Service:Best practices for configuring public bandwidth

Last Updated:Mar 27, 2024

This topic describes the billing methods for network usage of Elastic Compute Service (ECS) instances. This topic also describes how to configure public bandwidth and change the billing method for network usage to meet your business requirements.

Billing methods for network usage

The following table describes the pay-by-bandwidth and pay-by-traffic billing methods for network usage and the scenarios in which the billing methods are applied.

Scenario

Billing method for network usage

Bandwidth type

Billing

Scenarios in which stable low-cost bandwidth is required

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 the specified bandwidth.

You are charged for the specified bandwidth based on a tiered billing model. The bandwidth fees are included in your instance fees. For more information, see Public bandwidth.

Scenarios in which bandwidth requirements are highly variable, such as scenarios in which traffic is low in most cases but spikes occasionally occur

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 the specified maximum bandwidth.

Note

Public bandwidth limits are determined based on instance billing methods and billing methods for network usage. For more information, see the Public bandwidth limits section of the "Limits" topic.

You are charged for the actual volume (in GB) of outbound traffic to the Internet based on the pay-as-you-go billing method. The bills are generated every hour on the hour. For more information, see Public bandwidth.

Methods for configuring 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 requirements.

Change the billing method for network usage.

For more information, see Change the billing method for network usage.

The specified public bandwidth does not suit your business requirements.

Modify the public bandwidth configurations.

The bandwidth of an elastic IP address (EIP) does not suit your business requirements.

Modify the bandwidth configurations of the EIP.

For more information, see Modify the bandwidth of an EIP.

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 then 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 the region and resource group to which the resource belongs. 地域

  4. On the Instance 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 on the Custom Launch tab.

    In this tutorial, complete the following network parameter settings:

    • Network and Zone: Select VPC.

      • Select an existing virtual private cloud (VPC) and an existing vSwitch from the drop-down lists.

      • Select Specify Primary Private IP Address of Primary ENI to specify a private IP address.

    • Public IP Address: Select Assign Public IPv4 Address.

    • Bandwidth Billing Method: Select Pay-by-bandwidth.

    • Bandwidth: Specify a public bandwidth in Mbit/s. Example: 10 Mbit/s. You are charged based on the specified bandwidth. The actual outbound bandwidth is capped at the 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 the instances. To create a secondary ENI when you create an instance, click the 添加 icon and select a vSwitch to which to connect the secondary ENI.

    • (Optional) IPv6: Assign an IPv6 address to the instance based on your business requirements.

    For more information about the preceding parameters, see the Bandwidth & Security Groups section of the "Create an instance on the Custom Launch tab" topic.

    公网带宽10M.png

    After the instance is created, the specified bandwidth is displayed in the Specifications column that corresponds to the instance on the Instances page.实例的带宽.png

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

If your instance has fluctuating bandwidth requirements and requires an upper bandwidth limit, 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.

Important

If the instance is associated with an EIP, perform the operations described in Modify the bandwidth of an EIP to change the billing method for network usage of the instance.

  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 the region and resource group to which the resource belongs. 地域

  4. Find the instance whose billing method for network usage you want to change. Then, perform operations based on the billing method of the instance to go to the configuration page.

    Billing method

    Procedure

    Subscription

    1. Find the subscription instance whose billing method for network usage you want to change. In the Actions column, click Change Configurations.

    2. In the dialog box that appears, click the Bandwidth Configuration tab.

    3. Select Change Subscription Instance Bandwidth and then click Continue.

    4. Select Downgrade Bandwidth.

    5. Click Continue.

    Important

    If you performed a temporary bandwidth upgrade on the instance, changing the billing method for network usage from pay-by-bandwidth to pay-by-traffic cancels all temporary bandwidth upgrade orders for the instance, including orders that already took effect and pending orders. You are refunded for the canceled temporary bandwidth upgrade orders.

    Pay-as-you-go

    1. Find the pay-as-you-go instance whose billing method for network usage you want to change. In the Actions column, click Change Configurations.

    2. In the dialog box that appears, click the Bandwidth Configuration tab.

    3. Select Change Pay-as-you-go Instance Bandwidth.

    4. Click Continue.

  5. On the Change Bandwidth page, find the Bandwidth section, select Pay-By-Traffic, and then specify a maximum bandwidth in Mbit/s. Example: 50 Mbit/s.

    You are charged based on the actual amount of traffic. The actual outbound bandwidth is capped at the specified maximum bandwidth to prevent out-of-control fees caused by bursts in traffic. 转换计费方式

  6. Read the notes and terms of service. Select ECS Service Terms.

  7. Confirm the price, click Confirm in the lower part of the page, and then perform the subsequent operations by following the on-screen instructions.

    After the billing method for network usage of the instance is changed, the new configurations immediately take effect. The specified maximum bandwidth is displayed in the Specifications column that corresponds to the instance on the Instances page. In this example, the maximum bandwidth is 50 Mbit/s.带宽峰值

References

Network FAQ