> For the complete documentation index, see [llms.txt](https://node1.gitbook.io/node1-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://node1.gitbook.io/node1-docs/documentation/zh/solana/fast-landing/keep-alive.md).

# 保持连接

## Keep-Alive 要求

node1 建议并期待客户端使用 持久化 HTTP 连接（HTTP Keep-Alive） 与服务通讯，以取得更稳定且低延迟的行为表现。

* 减少重复建立连接的成本（TCP/TLS 握手）。
* 降低高频呼叫时的端到端延迟。
* 在长时间或突发流量下提升稳定性。

## 如何维持连接

多数 HTTP/1.1 客户端默认会启用 Keep-Alive，但某些自定义实现或代理层可能会关闭它。请确认你的客户端设定为维持连接不中断。

### 1. 确保使用 HTTP/1.1 Keep-Alive

在 HTTP/1.1 中 Keep-Alive 通常默认启用。若手动管理 Header，请不要送出 "Connection: close"。

### 2. 使用 Ping 端点验证

通过 GET /ping 作为轻量级健康检查，确认服务是否可达。

* 方法: `GET`
* 路径: `/ping`
* 回应: `pong`
* 状态: `200 OK`

## 范例（curl）

测试连接：

```bash
curl -s http://ny.node1.me/ping
# Output: pong
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://node1.gitbook.io/node1-docs/documentation/zh/solana/fast-landing/keep-alive.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
