如何限制 OpenLiberty 中的 HTTP 连接数?

How can I limit the number of HTTP connections in OpenLiberty?

我想限制 OpenLiberty 上 Web 应用程序的 HTTP 连接数。我应该更改哪些参数来执行此操作?我正在查看文档,我应该更改 HTTPOption 中的 maxConcurrentStreams 还是 executer 中的 maxThread?

没有现有的 属性 来专门限制 HTTP 连接,所以我建议使用 maxOpenConnections,这是一个 tcpOptions 配置[1]。 属性 允许您限制 TCP 端点的打开连接数。默认值为 128000.

maxConcurrentStreams 特别适用于 HTTP/2 每个 HTTP/2 (TCP) 连接允许的 的数量,并且 maxThread 不会直接完成你想要的。

[1] https://openliberty.io/docs/21.0.0.2/reference/config/httpEndpoint.html#tcpOptions