You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function _M.http_access_phase()
local ngx_ctx = ngx.ctx
if not verify_tls_client(ngx_ctx.api_ctx) then
return core.response.exit(400)
end
-- always fetch table from the table pool, we don't need a reused api_ctx
local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
ngx_ctx.api_ctx = api_ctx
core.ctx.set_vars_meta(api_ctx)
if true then return end
These code alone decrease qps 13%
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
just add the conf
upstream backend_servers {
server 172.27.255.37:81;
keepalive 16;
}
then change http_access_phase
function _M.http_access_phase()
local ngx_ctx = ngx.ctx
if not verify_tls_client(ngx_ctx.api_ctx) then
return core.response.exit(400)
end
-- always fetch table from the table pool, we don't need a reused api_ctx
local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
ngx_ctx.api_ctx = api_ctx
core.ctx.set_vars_meta(api_ctx)
if true then return end
and wrk test get qps: 29591.64
ant then move if true then return end just in the entrance of the func
function _M.http_access_phase()
if true then return end
local ngx_ctx = ngx.ctx
if not verify_tls_client(ngx_ctx.api_ctx) then
return core.response.exit(400)
end
-- always fetch table from the table pool, we don't need a reused api_ctx
local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
ngx_ctx.api_ctx = api_ctx
core.ctx.set_vars_meta(api_ctx)
and wrk test get qps 34175.09
Environment
APISIX version (run apisix version): any version
Operating system (run uname -a):
OpenResty / Nginx version (run openresty -V or nginx -V):
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
APISIX Dashboard version, if relevant:
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run luarocks --version):
The text was updated successfully, but these errors were encountered:
Current Behavior
http {
function _M.http_access_phase()
local ngx_ctx = ngx.ctx
if true then return end
These code alone decrease qps 13%
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
just add the conf
upstream backend_servers {
server 172.27.255.37:81;
keepalive 16;
}
then change http_access_phase
function _M.http_access_phase()
local ngx_ctx = ngx.ctx
if true then return end
and wrk test get qps: 29591.64
ant then move
if true then return end
just in the entrance of the funcfunction _M.http_access_phase()
if true then return end
local ngx_ctx = ngx.ctx
and wrk test get qps 34175.09
Environment
apisix version
): any versionuname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: