WSO2 API Manager v2.2.0 性能

WSO2 API Manager v2.2.0 Performance

我有 WSO2 API Manager v2.2.0 以这种方式分发,每个服务器 1 个组件:Traffic、Publisher、Store、Key Manager 和 Gateway。安装后,我根据文档 Performance Tuning and tuning performance 进行了调整,但最大 TPS 约为 200。使用 wireshark,我注意到 Gateway 仅打开两个与 Key Manager 的同时连接,这是正常行为吗?任何帮助将不胜感激。

以下是我的配置:

nhttp.properties

snd_t_core=200
snd_t_max=250
snd_alive_sec=5
snd_qlen=-1
snd_io_threads=4
lst_t_core=200
lst_t_max=750
lst_alive_sec=5
lst_qlen=-1
lst_io_threads=4
http.socket.reuseaddr=true

passthru-http.properties

worker_pool_size_core=400
worker_pool_size_max=500
# worker_thread_keepalive_sec=60
worker_pool_queue_length=-1
io_threads_per_reactor=4
io_buffer_size=16384
http.max.connection.per.host.port=32767
http.socket.reuseaddr=true

卡特琳娜-server.xml

maxThreads="750"
minSpareThreads="150"
disableUploadTimeout="false"
enableLookups="false"
connectionUploadTimeout="120000"
maxKeepAliveRequests="600"
acceptCount="600"

api-manager.xml

<APIKeyValidator>
<ServerURL>https://key-manager.net:9443/services/</ServerURL>
<Username>username</Username>
<Password>password</Password>
<KeyValidatorClientType>WSClient</KeyValidatorClientType>
<ThriftClientConnectionTimeOut>10000</ThriftClientConnectionTimeOut>
<EnableThriftServer>false</EnableThriftServer>
<ThriftServerHost>localhost</ThriftServerHost>
<!--ThriftServerPort>10397</ThriftServerPort-->
<ConnectionPool>
<MaxIdle>750</MaxIdle>
<InitIdleCapacity>50</InitIdleCapacity>
</ConnectionPool>
<KeyValidationHandlerClassName>org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler</KeyValidationHandlerClassName>
</APIKeyValidator>

网关-密钥管理器连接没有这样的限制。默认情况下,网关中有一个令牌缓存,如果您在负载测试中重复使用令牌,与 keymanager 的连接很少是正常的。完全不是问题。

请看

正如我在其中提到的,如果启用分析,您可以了解请求流的哪一部分导致了大部分延迟。