All Products
Search
Document Center

Server Load Balancer:ALB billing rules

更新時間:Mar 11, 2024

Application Load Balancer (ALB) supports the pay-as-you-go billing method. The pay-as-you-go billing method allows you to use resources before you pay for the resources. This topic describes the billing rules, billable items, and billing cycles of pay-as-you-go ALB instances.

Overview

Item

Pay-as-you-go

Billing rule

You are charged based on resource usage. Bills are generated and fees are deducted from your account balance at the end of each billing cycle.

Billing cycles and bill generation time

  • ALB instances and Load Balancer Capacity Units (LCUs) are billed on an hourly basis. You are charged based on resource usage. In most cases, bills are generated within an hour after a billing cycle ends. The time when bills are generated is determined by the system.

  • Internet-facing ALB instances use elastic IP addresses (EIPs) to provide services over the Internet. If you use an Internet-facing ALB instance, you are charged for data transfer over the Internet. The billing cycle, fee deduction time, and bill generation time are determined by the pay-as-you-go EIP. For more information, see Billing cycle.

Billable items

ALB supports the pay-as-you-go billing method. The billable items of ALB include instances, LCUs, and Internet data transfer.

Network Type

Instance fee

LCU fee

Internet data transfer fee

Internet-facing

Charged

Charged

Charged

Internal-facing

Charged

Charged

Not charged

Instance fee

You are charged an instance fee for an ALB instance on an hourly basis. If you use an ALB instance for less than 1 hour in a billing cycle, the usage duration is rounded up to 1 hour. Billing begins when the instance is created and ends when the instance is released.

Instance fee = Instance unit price (USD per hour) × Usage duration (hours)

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

Edition

Instance fee (USD/hour)

Basic

0.007

Standard

0.021

WAF-enabled

0.035

LCU fee

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

Performance metrics

ALB charges LCU fees 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 = max{Number of LCUs for new connections, Number of LCUs for concurrent connections, Number of LCUs for data transfer, Number of LCUs for rule evaluations} × LCU unit price

The number of LCUs consumed per hour is calculated based on four metrics. You are charged based on the largest number of LCUs among the metrics. The following table describes the metrics.

Metric

Description

Unit

LCU coefficient

Calculation

Number of new connections

The number of new connections per second (CPS).

Seconds

25

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

Number of LCUs = Largest CPS value/LCU coefficient

Number of concurrent connections (CONNS)

The number of CONNS per minute.

Minutes

3,000

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

Number of LCUs = Largest CONNS value/LCU coefficient

Amount of data transfer

The amount of data transfer over HTTP and HTTPS processed by ALB. Unit: GB.

Hours

1 GB

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

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

Number of evaluated rules

The product of the number of specific items processed by an ALB instance and the queries per second (QPS). The items include forwarding rules, lines of code in AScript, and additional certificates.

  • If the number of items does not exceed the quota, the number of rule evaluations is equal to the QPS value.

  • If the number of items exceeds the quota, the number of rule evaluations is calculated by using the following formula: Number of rule evaluations = QPS × (Number of forwarding rules that exceed the quota + Number of lines of code in AScript that exceed the quota + Number of additional certificates that exceed the quota).

Important
  • Forwarding rules, lines of code in AScript, and additional certificates have the same quota, which is 25. You are charged only for the number of items that exceed the quota.

  • Beginning March 22, 2022, the free quota for forwarding rules is increased from 10 to 25.

  • By default, the AScript feature is unavailable. To use this feature, log on to the Quota Center console. On the Privileges page, enter the quota ID slb_user_visible_gray_label/ascript and click Apply in the Actions column. For more information, see Manage ALB quotas and Step 2: Create scripts to customize forwarding rules.

N/A

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 by using the following formula:

Number of LCUs = Number of rule evaluations/LCU coefficient

The number of LCUs that are consumed by an ALB listener per hour is calculated based on the metric on which the listener consumes the largest number of LCUs. The LCU fee of an ALB instance is the sum of the LCU fee of each listener.

LCU unit price

After the hourly metrics of an ALB 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 that hour is calculated by using the following formula: 0.1 × 0.007 = USD 0.0007.

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

Billable item

LCU unit price (USD/hour)

LCU

0.007

LCU billing examples

Metric

Example

Calculation

LCU consumption

Number of new connections per second

Up to 100 new connections are established per second in an hour.

In this example, the CPS value is 100. Every 25 connections consume an LCU per second. The number of LCUs that are consumed is calculated by using the following formula:

100/25 = 4.0

4.0

Number of concurrent connections per minute

Up to 18,000 concurrent connections are established in the hour.

In this example, the CONNS value is 18,000. The number of LCUs that are consumed is calculated by using the following formula:

18,000/3,000 = 6.0

6.0

Data transfer per hour

1,000 KB per second.

The amount of data transfer processed per hour is calculated by using the following formula:

1,000 KB × 60 × 60 = 3,600,000 KB = 3.6 GB

One GB of data transfer consumes an LCU per hour. The number of LCUs that are consumed is calculated by using the following formula:

3.6/1 = 3.6

3.6

Number of rule evaluations per second

  • 30 forwarding rules.

  • 20 lines of code in AScript.

  • 32 additional certificates.

Up to 100 new connections are established per second in the hour. Four requests are sent through each connection. Therefore, the number of requests received is calculated by using the following formula:

100 × 4 = 400

转发规则计算示例In this example, the number of forwarding rules and the number of additional certificates configured exceed the quota. The number of rule evaluations is calculated by using the following formula:

[(30 - 25) + (32 - 25)] × 400 = 4,800

Every 1,000 rule evaluations consume an LCU per second. The number of LCUs used for rule evaluations is calculated by using the following formula:

4800/1,000 = 4.8

4.8

In this example, the concurrent connections consume the largest number of LCUs, which is 6.0. Therefore, the LCU fee is calculated based on the number of concurrent connections.

LCU fee per hour = USD 0.007/LCU × 6.0 LCUs = USD 0.042
LCU fee per month = USD 0.042 × 24 (hours) × 30 (days) = USD 30.24

Estimate LCU consumption

You can use the LCU calculator to estimate the number of LCUs consumed by your ALB service.

LCU Calculator

Internet data transfer fee

You are not charged Internet data transfer fees if you use internal-facing ALB instances. You are charged Internet data transfer fees only if you use Internet-facing ALB instances. Internet-facing ALB instances use EIPs to provide services over the Internet. If you use an Internet-facing ALB instance, you are charged an instance fee and a data transfer fee. For more information, see Pay-as-you-go.