Help Center/ NAT Gateway/ Billing/ Billing Modes/ Pay-per-use Billing
Updated on 2024-07-30 GMT+08:00

Pay-per-use Billing

Pay-per-use billing means you pay nothing up front and are not tied into any contract or commitment. Public NAT gateways support pay-per-use billing by day only. Private NAT gateways support pay-per-use billing by hour only. This section describes the billing rules for pay-per-use NAT gateways.

Application Scenarios

Pay-per-use billing is good for short-term, bursty, or unpredictable workloads that cannot tolerate any interruptions, such as applications for e-commerce flash sales, temporary testing, and scientific computing.

Billing Items

The fee of a pay-per-use NAT gateway is charged based on the NAT gateway type, specifications, and usage duration.

Billing Usage Period

Public NAT gateway

The billing cycle of a pay-per-use public NAT gateway is from 08:00 on the previous day to 08:00 on the next day. Any period less than one day is counted as one day.

For example, you purchased a small public NAT gateway charged by day on April 18, 2024, 06:00:00 and deleted it on April 19, 2024, 9:00:00. The following three usage periods will be billed:

  • April 18, 2023, 06:00:00 to April 18, 2023, 8:00:00
  • April 18, 2023, 08:00:00 to April 19, 2023, 8:00:00
  • April 19, 2023, 08:00:00 to April 20, 2023, 8:00:00

Private NAT gateway

Pay-per-use private NAT gateway usage is calculated by the second and billed every hour. The billing starts when the private NAT gateway is launched and ends when the instance is deleted.

For example, if you purchased a small pay-per-use private NAT gateway on April 18, 2023, 8:45:30 and deleted it on April 18, 2023, 8:55:30, you are billed for the 600 seconds from 8:45:30 to 8:55:30.

Billing Examples

Public NAT gateway

Suppose you purchased a small public NAT gateway on April 18, 2023, 6:00:00 and deleted it on April 19, 2023 9:00:00, the NAT gateway are billed as follows:

Table 1 Example of billing a public NAT gateway (by day)

Billing Usage Period

Formula

Total Price (USD)

One day (April 18, 2023, 6:00:00 to April 18, 2023, 8:00:00)

Unit price of the public NAT gateway specifications x Required duration

2.44 x 1 = 2.44

One day (April 18, 2023, 8:00:00 to April 19, 2023, 8:00:00)

2.44 x 1 = 2.44

One day (April 19, 2023, 08:00:00 to April 20, 2023, 8:00:00)

2.44 x 1 = 2.44

Private NAT gateway

Suppose you purchased a small private NAT gateway on April 18, 2023, 8:45:00 and deleted it on April 18, 2023, 9:55:00.

Table 2 Example of billing a private NAT gateway (by the hour)

Billing Usage Period

Formula

Total Price (USD)

One hour (April 18, 2023, 8:00:00 to April 18, 2023, 9:00:00)

Unit price of the private NAT gateway specifications x Required duration

0.1/3600 x 900 = 0.025

One hour (April 18, 2023, 9:00:00 to April 18, 2023, 10:00:00)

0.1/3600 x 3300 = 0.09

  • The prices are examples only. The actual prices are those displayed on NAT Gateway Pricing Details.
  • The hourly price of a resource is displayed in the product pricing details. If the usage period of a resource is less than one hour, the usage period is calculated by second. In this case, you need to divide the hourly price by 3,600 to obtain the price for each second. Then, calculate the price.

Price Change After Specification Change

  • If you upgrade your public NAT gateway specifications, the billing will be based on the more robust specifications used on the same day.

    For example, you purchased a small, pay-per-use public NAT gateway at 9:00:00 on April 18, 2023, and upgraded it to a medium one at 9:30:00. Then you deleted the medium public NAT gateway at 10:30:00 on April 18, 2023. The medium public NAT gateway will be billed from April 18, 2023, 8:00:00 to April 19, 2023, 8:00:00.

  • If you purchase a pay-per-use private NAT gateway and change its specifications later, you will be billed separately (accurate to seconds) before and after the change in the current billing cycle (by hour).

    For example, you purchased a small private NAT gateway at 9:00:00 on April 18, 2023, and upgraded it to a medium one at 9:30:00. Then you deleted the medium private NAT gateway at 10:30:00 on April 18, 2023. The first billing cycle is from April 18, 2023, 9:00:00 to April 19, 2023, 10:00:00. Charges incurred between 9:00:00 and 9:30:00 are billed based on the small specifications, and charges incurred between 9:30:00 and 10:00:00 are billed based on the medium specifications. The second billing cycle from April 18, 2023, 10:00:00 to April 19, 2023, 11:00:00. Charges incurred between 10:00:00 to 10:30:00 are billed based on the medium specifications.

Impact of Arrears

Figure 1 shows the statuses of a NAT gateway can have throughout its lifecycle. After a NAT gateway is purchased, it enters the valid period and runs normally during this period. If your account goes into arrears, the NAT gateway enters a grace period and then a retention period.

Figure 1 Lifecycle of a pay-per-use NAT gateway

Arrears Reminder

The system will bill you for pay-per-use resources after each billing cycle ends. If your account goes into arrears, we will notify you by email, SMS, or in-app message.

Impact of Arrears

  • If your account is insufficient to pay your amount due, your account goes into arrears, and the pay-per-use NAT gateway enters the grace period. You are still responsible for expenditures generated during the grace period. You can view the charges on the Billing Center > Overview page and pay any past due balance as needed.
  • If you do not bring your account balance current before the grace period expires, the NAT gateway turns to Frozen and enters a retention period. You cannot perform any operations on a pay-per-use NAT gateway in the Frozen state.
  • If you do not bring your account balance current before the retention period ends, your NAT gateway will be released and the data cannot be restored.