# 公网 NAT 网关计费

## 前提条件

* 公网 NAT 网关资源均为[**按需付费**](/welcome/cn/pricing/general-pricing-rules/pay-as-you-go.md)资源，按小时计费，最少计费时间为一小时。请先参阅[**通用定价规则**](/welcome/cn/pricing/general-pricing-rules.md)和[**通用生命周期规则**](/welcome/cn/pricing/general-lifecycle-rules.md)了解按需付费资源的基本计费方式。
* 公网 NAT 网关目前包含以下计费项目：实例费用和 CU 费用。由于 NAT 网关需要绑定弹性 IP 才能访问互联网，因此您还需为与 NAT 网关关联的弹性 IP 支付费用。详情请参阅[**弹性 IPv4**](/welcome/cn/pricing/elastic-compute-billing.md#elastic-ipv4)。

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

<mark style="color:blue;">实际价格因地区和可用区不同而有所变化，因此以订单页面显示的价格为准。</mark>
{% endhint %}

## 计费项目

### 公网 NAT 网关实例

公网 NAT 网关的计费方式为[**按需付费**](/welcome/cn/pricing/general-pricing-rules/pay-as-you-go.md)。您将按照每小时使用资源的情况进行事后支付。

### CU

CU（容量单位）是衡量公网 NAT 网关消耗资源的最小单位。CU 的数量由每分钟并发连接数和每秒新建连接数（CPS）的最高值决定，并进一步受到 CU 系数的影响。

**指标**

* **并发连接数**\
  并发连接数是指在特定时间内（每分钟）公网 NAT 网关同时处理的活跃连接数。
* **CPS**\
  每秒新建连接数（CPS）是指公网 NAT 网关在一秒钟内可以处理的新连接数。

**CU 系数**

计算 CU 的数量时，将每分钟并发连接数和 CPS 的最高值除以相应的 CU 系数。

<table><thead><tr><th width="281.70703125">指标</th><th>CU 系数</th></tr></thead><tbody><tr><td>并发连接数</td><td>10,000</td></tr><tr><td>CPS</td><td>1,000</td></tr></tbody></table>

#### **CU 费用计算公式**

> * CU 费用 = CU 单价（美元/CU） × 每小时 CU 数 × 时长（小时）
>
> * 每小时 CU 数 = max {并发连接数的 CU 数, CPS 的 CU 数}
>
> > 并发连接数的 CU 数 = 最高并发连接数值/CU 系数
> >
> > CPS 的 CU 数 = 最高 CPS 值/CU 系数

#### CU 计费示例

您创建了一个按需付费的公网 NAT 网关。一小时后释放该网关。下表描述了在此期间内最高的并发连接数值、最高的 CPS 值以及总数据传输量。

<table><thead><tr><th width="236.663330078125">指标</th><th>CU 数</th></tr></thead><tbody><tr><td>并发连接数</td><td><p>一小时内最高值为 500,000。</p><p>CU 数 = 500,000/10,000 = 5.0</p></td></tr><tr><td>CPS</td><td><p>一小时内最高值为 2,000。</p><p>CU 数 = 2,000/1,000 = 2.0</p></td></tr></tbody></table>

每小时 CU 数\
\= max {并发连接数的 CU 数, CPS 的 CU 数}\
\= 并发连接数的 CU 数\
\= 5.0

假设 CU 单价为 $0.500/小时，则您的 CU 费用为：

CU 费用\
\= CU 单价（美元/CU） × 每小时 CU 数 × 时长（小时）\
\= $0.500/CU/h × 5.0 CUs × 1 h\
\= $2.500


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/pricing/elastic-compute-billing/public-nat-gateway-billing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
