All Products
Search
Document Center

Server Load Balancer:Pay-as-you-go

Last Updated:Mar 11, 2024

Classic Load Balancer (CLB) supports the pay-as-you-go billing method. You can release a pay-as-you-go CLB instance anytime.

Note

CLB provides high-performance instances and shared-resource instances. Shared-resource instances are no longer available for purchase. The CLB instances described in this topic refer to high-performance CLB instances.

Billing rules

Item

Description

Billing rules

The pay-as-you-go billing method allows you to use resources before you pay for the resources. Bills are generated and fees are deducted after each billing cycle.

Use scenarios

The pay-as-you-go billing method is ideal for the following scenarios:

  • The resource usage fluctuates.

  • Workloads expect temporary traffic spikes.

Billing cycles

Fees are calculated on an hourly basis (UTC+8). After the fees within a billing cycle are calculated, a new billing cycle begins. For example, if you create a pay-as-you-go CLB instance at 09:30:00 (UTC+8) and release the instance at 12:30:00 (UTC+8), the usage duration is 4 hours.

Note

If the total amount of the balance and vouchers in your Alibaba Cloud account is less than the fee that you need to pay, you are notified by text message or email.

Configuration changes

The following figure describes the metering methods and configuration changes of pay-as-you-go CLB instancespay-as-go:

  • Pay-as-you-go CLB instances support the pay-by-LCU and pay-by-specification metering methods. You can switch between the metering methods. For more information, see Change the configuration of a pay-as-you-go instance.

  • Internet data transfer that is billed based on the pay-as-you-go billing method supports the pay-by-bandwidth and pay-by-data-transfer metering methods. CLB allows you to switch between the metering methods.

  • You can change the specification and maximum bandwidth of a pay-by-specification CLB instance.

For more information, see Modify the configurations of pay-as-you-go CLB instances.

Effective time of configuration changes

If you change the configuration of a CLB instance but do not change the metering method of Internet data transfer, the change immediately takes effect. If you change the configuration of a CLB instance and also change the metering method of Internet data transfer, the changes take effect at 00:00:00 (UTC+8) on the next day.

Maximum bandwidth

  • Pay-by-data-transfer CLB instances: The maximum bandwidth is not a guaranteed value. It indicates the upper limit of bandwidth and is for reference only. In case of resource contention, the bandwidth allocated to each CLB instance may be lower than the maximum bandwidth value.

  • Pay-by-bandwidth CLB instances: The maximum bandwidth is a guaranteed value. In scenarios where demand outstrips resource supplies, the bandwidth can reach the specified value.

For more information, see Bandwidth limits.

Metering methods

Pay-as-you-go CLB instances support the pay-by-LCU and pay-by-specification metering methods. The billable items of a CLB instance vary based on the metering method and network type of the CLB instance, and the metering method of Internet data transfer.

Note

In the following table, a hyphen (-) indicates that you are not charged the fee and a check mark (✔) indicates that you are charged the fee.

Pay-by-LCU (new)

Network type

Metering method of Internet data transfer

Performance

Instance fee

Specification fee and Load Balancer Capacity Unit (LCU) fee

Internet data transfer fee

Specification fee

LCU fee

Data transfer fee

Bandwidth fee

Internet-facing

Pay-by-data-transfer

Automatically scales on demand. The upper limit is defined in the s3.large specification.

-

-

Internal-facing

-

Automatically scales on demand. The upper limit is defined in the s3.large specification.

-

-

-

-

Pay-by-specification

Network type

Metering method of Internet data transfer

Performance

Instance fee

Specification fee and LCU fee

Internet data transfer fee

Specification fee

LCU fee

Data transfer fee

Bandwidth fee

Internet-facing

Pay-by-data-transfer

Determined by the specification that you purchase. The highest specification that you can select is s3.large.

-

-

Pay-by-bandwidth

Determined by the specification that you purchase. The highest specification that you can select is s3.large.

-

-

Internal-facing

-

Determined by the specification that you purchase. The highest specification that you can select is s3.large.

-

-

-

-

Instance fee

  • Description

    You are charged instance fees for CLB instances on an hourly basis. If the usage duration in a billing cycle is less than 1 hour, the usage duration is rounded up to 1 hour. The usage duration refers to the period of time from when a CLB instance is created to when the CLB instance is released.

    Note

    You are not charged instance fees for internal-facing CLB instances.

  • Calculation formula

    Instance fee = Instance unit price (USD per hour) × Duration of usage (hours)
  • Pricing

    Click to view the unit prices in different regions. The prices in the following table are for reference only. The prices on the buy page shall prevail.

    Region

    Instance fee (USD per hour)

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Heyuan), and China (Chengdu)

    0.003

    China (Hong Kong), Japan (Tokyo), UAE (Dubai), and South Korea (Seoul)

    0.009

    US (Silicon Valley) and US (Virginia)

    0.005

    Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), India (Mumbai), UK (London), Germany (Frankfurt), Australia (Sydney), and Thailand (Bangkok)

    0.006

  • Example

    Alice purchased an Internet-facing CLB instance at 10:00:00 (UTC+8) on January 20, 2022 in the China (Hangzhou) region and released the CLB instance at 12:34:00 (UTC+8) on January 21, 2022. The instance fee is calculated based on the following formula:

    Instance unit price in the China (Hangzhou) region = USD 0.003 per hour
    Usage duration = 27 hours
    Instance fee = USD 0.003 per hour × 27 hours = USD 0.081

Specification fee and LCU fee

Specification fee

You are charged specification fees only for pay-by-specification CLB instances. The following section describes the metrics of high-performance CLB instances. The performance of a CLB instance varies based on the specification.

  • Maximum number of connections

    The maximum number of connections that can be established to a CLB instance. When the number of existing concurrent connections reaches the upper limit, new connection requests are dropped.

  • Connections per second (CPS)

    The maximum number of new connections that can be established to a CLB instance per second. When the actual number reaches the upper limit, new connection requests are denied.

  • Queries per second (QPS)

    The maximum number of HTTP or HTTPS requests that can be processed per second. This metric is specific to Layer 7 listeners. When the actual number reaches the upper limit, new requests are denied.

Click to view the specifications, performance metrics, and prices. The prices in the following table are for reference only. The prices on the buy page shall prevail.

Specification

Maximum number of connections

CPS

QPS

Unit price in the Chinese mainland and China (Hong Kong) (USD per hour)

Unit price outside China (USD per hour)

Specification 1: Small I (slb.s1.small)

5,000

3,000

1,000

0.01

0.012

Specification 2: Medium I (slb.s2.small)

50,000

5,000

5,000

0.05

0.06

Specification 3: Medium II (slb.s2.medium)

100,000

10,000

10,000

0.10

0.12

Specification 4: Large I (slb.s3.small)

200,000

20,000

20,000

0.20

0.24

Specification 5: Large II (slb.s3.medium)

500,000

50,000

30,000

0.31

0.37

Specification 6: Super Large I (slb.s3.large)

1,000,000

100,000

50,000

0.51

0.61

Example: Alice purchased an Internet-facing CLB instance of the slb.s2.small specification at 10:00:00 (UTC+8) on January 20, 2022 in the China (Hangzhou) region and released the CLB instance at 12:34:00 (UTC+8) on January 21, 2022. The specification fee is calculated based on the following formula:

Unit price of the slb.s2.small specification in the China (Hangzhou) region = USD 0.05 per hour
Usage duration = 27 hours
Specification fee = USD 0.05 per hour × 27 hours = USD 1.35

LCU fee

An LCU is the smallest unit that is used to measure resources consumed by CLB instances.

Definition

You are charged LCU fees of CLB on an hourly basis. The billing cycle is 1 hour. If the usage duration in a billing cycle is less than 1 hour, the usage duration is rounded up to 1 hour.

LCU fee per hour = LCU unit price (USD per LCU) × Number of LCUs consumed per hour

Number of LCUs per hour = max {Number of LCUs based on new connections, Number of LCUs based on concurrent connections, Number of LCUs based on data transfer, Number of LCUs based on rule evaluations}

LCUs are used to measure the performance when CLB processes traffic. The performance metrics of an LCU vary based on the protocol of a CLB listener.

  • TCP traffic

    Metric

    Description

    Unit

    LCU coefficient

    How the number of LCUs consumed per hour is calculated

    Number of new connections

    The number of new TCP connections processed per second.

    Seconds

    800

    The system collects all CPS values within a billing cycle and then divides the highest CPS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CPS value/LCU coefficient

    Number of CONNS

    The number of concurrent TCP connections per minute.

    Minutes

    100,000

    The system collects all CONNS values within a billing cycle and then divides the highest CONNS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CONNS value/LCU coefficient

    Data transfer

    The amount of data transfer over TCP that is processed by CLB. Unit: GB.

    Hours

    1 GB

    The system divides the total amount of data transfer over TCP within a billing cycle by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Total amount of data transfer/LCU coefficient
  • UDP traffic

    Metric

    Description

    Unit

    LCU coefficient

    How the number of LCUs consumed per hour is calculated

    Number of new connections

    The number of new UDP connections processed per second.

    Seconds

    400

    The system collects all CPS values within a billing cycle and then divides the highest CPS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CPS value/LCU coefficient

    Number of CONNS

    The number of concurrent UDP connections per minute.

    Minutes

    50,000

    The system collects all CONNS values within a billing cycle and then divides the highest CONNS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CONNS value/LCU coefficient

    Data transfer

    The amount of data transfer over UDP that is processed by CLB. Unit: GB.

    Hours

    1 GB

    The system divides the total amount of data transfer over UDP within a billing cycle by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Total amount of data transfer/LCU coefficient
  • HTTP and HTTPS traffic

    Metric

    Description

    Unit

    LCU coefficient

    How the number of LCUs consumed per hour is calculated

    Number of new connections

    The number of new HTTP and HTTPS connections processed per second.

    Seconds

    25

    The system collects all CPS values within a billing cycle and then divides the highest CPS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CPS value/LCU coefficient

    Number of CONNS

    The number of concurrent HTTP and HTTPS connections per minute.

    Minutes

    3,000

    The system collects all CONNS values within a billing cycle and then divides the highest CONNS value by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Highest CONNS value/LCU coefficient

    Data transfer

    The data transfer over HTTP and HTTPS that is processed by CLB. Unit: GB.

    Hours

    1 GB

    The system divides the total amount of data transfer over HTTP and HTTPS within a billing cycle by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Total amount of data transfer/LCU coefficient

    Number of rule evaluations

    The product of the number of forwarding rules processed by CLB and the number of queries per second (QPS). The first 25 forwarding rules are free of charge. If the number of forwarding rules processed by CLB is greater than 25, the following formula applies: Number of rule evaluations = QPS × (Number of forwarding rules processed by CLB - 25). If the number of forwarding rules is less than 25, the following formula applies: Number of rule evaluations = QPS.

    Seconds

    1,000

    The system collects the number of forwarding rules and all QPS values within a billing cycle and uses the largest QPS value to calculate the number of rule evaluations. Then, the system divides the number of rule evaluations by the LCU coefficient to calculate the number of LCUs. The number of LCUs is calculated based on the following formula:

    Number of LCUs = Number of rule evaluations/LCU coefficient

The number of LCUs that are consumed by a CLB listener per hour is equal to the largest number of LCUs consumed for different metrics. The LCU fee of a CLB instance is the sum of the LCU fees for all listeners.

LCU unit price

After the hourly metrics of a CLB instance are converted into LCUs, the hourly LCU consumption is calculated based on the actual usage. The LCU consumption is accurate to 0.000001 LCU. For example, if you consume 0.1 LCU in an hour, the LCU fee for the hour is calculated based on the following formula: 0.1 × 0.007 = USD 0.0007.

The prices in the following table are for reference only. The prices on the buy page shall prevail.

Billable item

Unit price of LCUs (USD per LCU-hour

LCU

0.007

Billing examples

Alice created a pay-by-LCU CLB instance in the China (Hangzhou) region at 08:10:00 (UTC+8) on June 8, 2022, and configured a TCP listener and an HTTP listener for the instance. Alice released the instance at 08:50:00 (UTC+8) on June 8, 2022. The following table describes the highest CPS value, the highest CONNS value, the amount of data transfer, and the largest number of rule evaluations of the CLB instance from 08:10:00 (UTC+8) to 08:50:00 (UTC+8).

Metric

TCP

HTTP

CPS (second)

The highest CPS value within the hour is 1,600. The number of LCUs is calculated based on the following formula:

1600/800 = 2

The highest CPS value within the hour is 100. The number of LCUs is calculated based on the following formula:

100/25 = 4

CONNS (minute)

The highest CONNS value within the hour is 480,000. The number of LCUs is calculated based on the following formula:

480,000/100,000 = 4.8

The highest CONNS value within the hour is 12,000. The number of LCUs is calculated based on the following formula:

12,000/3,000 = 4

Data transfer (hour)

The data transfer over TCP processed by CLB within the hour is 4 GB. The number of LCUs is calculated based on the following formula:

4/1 = 4

The data transfer over HTTP processed by CLB within the hour is 3.6 GB. The number of LCUs is calculated based on the following formula:

3.6/1 = 3.6

Number of rule evaluations (second)

0

For example, 40 forwarding rules are created for the HTTP listener, and the highest QPS value within the hour is 400. In this example, the number of forwarding rules that you configured exceeds the free quota. The largest number of rule evaluations within the hour is calculated based on the following formula:

(40-25) × 400 = 6,000

The number of LCUs is calculated based on the following formula:

6,000/1,000 = 6

In this example, the metric for which the TCP listener consumes the largest number of LCUs is the number of concurrent connections (4.8 LCUs), and the metric for which the HTTP listener consumes the largest number of LCUs is the number of rule evaluations (6 LCUs).

LCU fee for the TCP listener = USD 0.007 × 4.8 = USD 0.0336
LCU fee for the HTTP listener = USD 0.007 × 6 = USD 0.042
Hourly LCU fee for the CLB instance = LCU fee for the TCP listener + LCU fee for the HTTP listener = USD 0.0336 + USD 0.042 = USD 0.0756
The average monthly LCU fee for the CLB instance is calculated based on the following formula: USD 0.0756 × 24 × 30 = USD 54.432
.

Internet data transfer fee

Data transfer fee (charged for pay-by-data-transfer Internet-facing instances)

  • Description

    You are charged for outbound data transfer over the Internet. You are not charged for inbound data transfer over the Internet. You are charged and billed for pay-by-data-transfer Internet-facing CLB instances on an hourly basis. If the usage duration is less than 1 hour in a billing cycle, the usage duration is rounded up to 1 hour.

  • Calculation formula

    Within a billing cycle:
    Data transfer fee = Unit price of data transfer (USD/GB) × Amount of data transfer (GB)
  • Pricing

    Click to view data transfer unit prices. The prices in the following table are for reference only. The prices on the buy page shall prevail.

    Region

    Data transfer fee (USD per GB)

    China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), and China (Heyuan)

    0.125

    China (Qingdao)

    0.113

    China (Hong Kong)

    0.156

    US (Silicon Valley) and US (Virginia)

    0.078

    Malaysia (Kuala Lumpur)

    0.112

    Singapore, Indonesia (Jakarta), India (Mumbai), and Thailand (Bangkok)

    0.117

    Japan (Tokyo)

    0.087

    Germany (Frankfurt) and UK (London)

    0.070

    UAE (Dubai)

    0.447

    Australia (Sydney)

    0.096

    South Korea (Seoul)

    0.123

  • Billing examples

    Alice purchased an Internet-facing pay-by-data-transfer CLB instance at 10:00:00 (UTC+8) on January 20, 2022 in the China (Hangzhou) region and released the CLB instance at 12:34:00 (UTC+8) on January 21, 2022. The outbound data transfer over the Internet is 5 GB.

    Unit price of data transfer in the China (Hangzhou) region = USD 0.125 per GB
    Outbound data transfer: 5 GB
    Data transfer fee = USD 0.125 per GB × 5 GB = USD 0.625 

Bandwidth fee (charged for pay-by-bandwidth Internet-facing instances)

  • Description

    You are charged and billed for pay-by-bandwidth Internet-facing CLB instances on a daily basis. If the usage duration in a billing cycle is less than 1 hour, the usage duration is rounded up to 1 hour. If the usage duration is less than one day, you are charged based on the number of hours that you use a CLB instance. The usage duration is the duration for which a CLB instance uses bandwidth.

    • The bandwidth fee of a pay-by-bandwidth Internet-facing CLB instance is calculated based on a tiered pricing model with 5 Mbit/s as the standard bandwidth value.

    • If you modified the maximum bandwidth of a CLB instance within a billing cycle, you are charged based on the highest value on that day.

    Note

    For pay-by-bandwidth CLB instances, the maximum inbound bandwidth is the same as the maximum outbound bandwidth.

  • Calculation formula

    For a CLB instance whose maximum bandwidth is from 1 to 5 Mbit/s, the bandwidth fee is calculated based on the following formula: Bandwidth fee = Maximum bandwidth × Bandwidth unit price × Usage duration.
    For a CLB instance whose maximum bandwidth is higher than 5 Mbit/s, the bandwidth fee is calculated based on the following formula: Bandwidth fee = [5 × Unit price of bandwidth from 1 to 5 Mbit/s + (Maximum bandwidth - 5) × Unit price of bandwidth higher than 5 Mbit/s] × Usage duration.
  • Pricing

    Click to view bandwidth unit prices. The prices in the following table are for reference only. The prices on the buy page shall prevail.

    Region

    Fee for bandwidth between 1 and 5 Mbit/s (USD per hour)

    Fee for bandwidth between 1 and 5 Mbit/s (USD per day)

    Fee for bandwidth higher than 5 Mbit/s (USD per hour)

    Fee for bandwidth higher than 5 Mbit/s (USD per day)

    China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Heyuan), and China (Chengdu)

    0.006

    0.144

    0.02

    0.48

    China (Qingdao)

    0.005

    0.12

    0.016

    0.384

    China (Hong Kong)

    0.006

    0.144

    0.02

    0.48

    Singapore, Indonesia (Jakarta), India (Mumbai), Malaysia (Kuala Lumpur), Germany (Frankfurt), UK (London), Australia (Sydney), Thailand (Bangkok), and South Korea (Seoul)

    0.006

    0.144

    0.02

    0.48

    Japan (Tokyo)

    0.007

    0.168

    0.023

    0.552

    UAE (Dubai)

    0.048

    11.52

    0.118

    2.832

    US (Silicon Valley) and US (Virginia)

    0.006

    0.144

    0.02

    0.48

  • Billing examples

    Alice purchased an Internet-facing CLB instance whose maximum bandwidth is 2 Mbit/s in the China (Hangzhou) region at 10:00:00 (UTC+8) on January 20, 2022 and changed the maximum bandwidth to 20 Mbit/s at 08:00:00 (UTC+8) on January 21, 2022. Then, Alice released the CLB instance at 12:34:00 (UTC+8) on January 21, 2022. The bandwidth fee is calculated based on the following formula:

    Maximum bandwidth on the day when Alice purchased the CLB instance: 2 Mbit/s
    Maximum bandwidth on the day when Alice modified the maximum bandwidth of the CLB instance: 20 Mbit/s
    Bandwidth fee for the first day: (2 × 0.006) × 14 = USD 0.168
    Bandwidth fee for the next day: [5 × 0.006 + (20 - 5) × 0.02] × 13 = USD 4.29
    Total fee = 0.168 + 4.29 = USD 4.458