> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/pricing/elastic-compute-billing/public-nat-gateway-billing.md).

# Public NAT Gateway Billing

## Prerequisites

* Public NAT gateway resources are all [**pay-as-you-go**](https://docs.console.zenlayer.com/welcome/pricing/general-pricing-rules/pay-as-you-go.md) resources charged by hour, with a minimum of one hour price. Please first see [**General Pricing Rules**](https://docs.console.zenlayer.com/welcome/pricing/general-pricing-rules.md) and [**General Lifecycle Rules**](https://docs.console.zenlayer.com/welcome/pricing/general-lifecycle-rules.md) to know about basic pricing ways of pay-as-you-go resources.
* Public NAT gateway currently includes the following pricing items: instance fees and CU fees. As NAT gateway needs to bind elastic IPs to access Internet, you'll be charged for the elastic IPs that are associated with the NAT gateway. See [**Elastic IPv4**](https://docs.console.zenlayer.com/welcome/pricing/elastic-compute-billing.md#elastic-ipv4) for more details.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">The actual price varies in different locations and zones, therefore the price shown on the order page shall prevail.</mark>
{% endhint %}

## Billing Items

### Public NAT Gateway Instance

The billing method of the public NAT gateway is [**Pay-as-you-go**](https://docs.console.zenlayer.com/welcome/pricing/general-pricing-rules/pay-as-you-go.md). You pay for your resources afterward by hour.

### CU

A CU (Capacity Unit) is the smallest unit used to measure resources consumed by a public NAT gateway. The number of CUs per hour is calculated as follows: take the peak concurrent connections and the average new connections per second (CPS) within the hour, divide each by its own CU coefficient, and use the larger result.

**Metrics**

* **Concurrent Connections**\
  Concurrent Connections refer to the number of active connections handled simultaneously by a public NAT gateway, sampled once per minute. Billing uses the peak value within the hour.
* **CPS**\
  Connections Per Second (CPS) refers to the number of new connections established through a public NAT gateway per second. Billing uses the average value within the hour.

**CU Coefficient**

Concurrent connections and CPS each have their own CU coefficient. Convert each metric separately, then take the larger value.

<table><thead><tr><th width="281.70703125">Metric</th><th>CU Coefficient</th></tr></thead><tbody><tr><td>Concurrent Connections</td><td>10,000</td></tr><tr><td>CPS</td><td>1,000</td></tr></tbody></table>

#### **CU Fee Formula**

> * CU fee = CU unit price (USD/CU) × Number of CUs per hour × Duration (hours)
>
> * Number of CUs per hour = max {Number of CUs for concurrent connections, Number of CUs for CPS}
>
> > Number of CUs for concurrent connections = Peak concurrent connections in the hour/Concurrent connections CU coefficient (10,000)
> >
> > Number of CUs for CPS = Average CPS in the hour/CPS CU coefficient (1,000)

#### CU Billing Example

You create a pay-as-you-go public NAT gateway. You release it after one hour. The following table describes the peak concurrent connections and the average CPS during this period.

<table><thead><tr><th width="236.663330078125">Metric</th><th>Number of CUs</th></tr></thead><tbody><tr><td>Concurrent Connections</td><td><p>The highest value within the hour is 50,000.</p><p>Number of CUs = 50,000/10,000 = 5.0</p></td></tr><tr><td>CPS</td><td><p>The average value within the hour is 2,000.</p><p>Number of CUs = 2,000/1,000 = 2.0</p></td></tr></tbody></table>

The Number of CUs per hour\
\= max {Number of CUs for concurrent connections, Number of CUs for CPS}\
\= Number of CUs for concurrent connections\
\= 5.0

Assume the CU unit price is $0.500/h, then your CU fee will be:

CU fee\
\= CU unit price (USD/CU) × Number of CUs per hour × Duration (hours)\
\= $0.500/CU/h × 5.0 CUs × 1 h\
\= $2.500
