Hi~
the code in nginx.conf
the code in proxy_pspeed_custom.lua
we use keepalive_timeout 0 and ngx.eof() to response to downstream and request to sub-request async. Just like the picture show below:
AND I think keepalive timeout 0 will cause the handshake to lose a lot of performance.
Nginx.conf:
proxy_pspeed_custom.lua
However,
when I use
wrk to test the performance, I found that using
ngx.timer.at QPS is even lower, which is not quite what I expected. I thought the performance would be better after opening keepalive and use
ngx.timer.at.
On a 16-core 32G machine,
when using ngx.eof
It bothers me.
Need Help.
Thanks.
-------------------------------------------Translate to Chinese-----------------------------------------------------
我们是一个做日志上报的网关,我们希望通过 openresty 实现先返回 204 给客户端,然后再上报给更后端的服务。
我们之前使用 keepalive timeout + ngx.eof 实现,但是了解到 ngx.eof 以后还是会占用 worker,所以想通过
ngx.timer.at 实现,但是压测下来的结果不是很理想,不知道是不是我的用法不对。 请求大家指点指点。
感谢