SylviaBABY commented on code in PR #7035:
URL: https://github.com/apache/apisix/pull/7035#discussion_r871953742


##########
docs/zh/latest/benchmark.md:
##########
@@ -69,3 +92,47 @@ title: 压力测试
 
 火焰图的采样结果:
 ![火焰图采样结果](../../assets/images/flamegraph-2.jpg)
+
+如果您想在您的机器上运行基准测试,您应该同时运行另一个 Nginx 来监听 80 端口:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "methods": ["GET"],
+    "uri": "/hello",
+    "plugins": {
+        "limit-count": {
+            "count": 999999999,
+            "time_window": 60,
+            "rejected_code": 503,
+            "key": "remote_addr"
+        },
+        "prometheus":{}
+    },
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "127.0.0.1:80": 1,
+            "127.0.0.2:80": 1
+        }
+    }
+}'
+```
+
+然后运行 wrk:
+
+```shell
+wrk -d 60 --latency http://127.0.0.1:9080/hello
+```
+
+有关如何运行基准测试的更多参考,您可以查看此[PR](https://github.com/apache/apisix/pull/6136)和此[脚本](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)。
+
+**注意**: 如果您想运行大量连接的基准测试,例如:
+
+```shell
+./wrk -t200 -c5000 -d30s http://127.0.0.1:9080/hello
+```
+
+您可能需要更新 
[conf/config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L242)
 中的 **keepalive** 配置项。
+
+超过配置数量的连接将成为短连接。更多文档可以参考: http: 
//nginx.org/en/docs/http/ngx_http_upstream_module.h

Review Comment:
   ```suggestion
   
超过配置数量的连接将成为短连接。更多文档可以参考:http://nginx.org/en/docs/http/ngx_http_upstream_module.html
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to