kong icon indicating copy to clipboard operation
kong copied to clipboard

refactor(*): use kong.tools.http.get_header when possible

Open bungle opened this issue 1 year ago • 1 comments

Summary

Just a small change to use the new tools.http.get_header in rest of the places. There is additional performance commit that makes the ngx.ctx.cached_headers the source for headers when ngx.ctx is passed to get_header.

bungle avatar Jan 30 '24 17:01 bungle

I run a simple proxy test, the result shows it improves 2.6% in RPS. (test model: link)

This pr: Requests/sec: 12024.57 Requests/sec: 11709.28
Requests/sec: 12027.06 avg: 11920.30

3.6.0.0-rc.3 Requests/sec: 11446.50 Requests/sec: 11775.31 Requests/sec: 11629.49 avg: 11617.09

chobits avatar Jan 31 '24 02:01 chobits

Should this PR be released in 3.7?

chronolaw avatar Apr 16 '24 13:04 chronolaw

Should this PR be released in 3.7?

Let's try to get it in. It is not a must, but I see no point of post-poning.

bungle avatar Apr 16 '24 13:04 bungle

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12463-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12463-to-master-to-upstream
git checkout -b cherry-pick-12463-to-master-to-upstream
ancref=$(git merge-base e7159cae979b8fde91b8bf70cd529da2af124908 1cca6874a3ecd6c0841a6b2c6f1f0cc374fbf8f3)
git cherry-pick -x $ancref..1cca6874a3ecd6c0841a6b2c6f1f0cc374fbf8f3

team-gateway-bot avatar Apr 19 '24 12:04 team-gateway-bot

I am removing incomplete-cherry-pick as there is now manual one: https://github.com/Kong/kong-ee/pull/8863

bungle avatar Apr 19 '24 13:04 bungle