Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golang plugin unstable performance #10480

Closed
1 task done
zyc0868 opened this issue Mar 14, 2023 · 4 comments
Closed
1 task done

golang plugin unstable performance #10480

zyc0868 opened this issue Mar 14, 2023 · 4 comments
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale

Comments

@zyc0868
Copy link

zyc0868 commented Mar 14, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

go-sdk 0.8.0

Current Behavior

When I use golang to program kong plugin, the time spent getting request headers is not evenly distributed, sometimes it takes 10~50 μs, sometimes it takes 40 ~ 100 ms

Expected Behavior

Time consuming should always be at the μs level

Steps To Reproduce

kong.Request.GetHeader("XXX")
kong.Request.GetPath()

Anything else?

none

@zffocussss
Copy link

you had better use lua to implement your plugin as much as possible.

@hanshuebner
Copy link
Contributor

@zyc0868 Go plugins are handled by a secondary process that will always be slower than plugins written in Lua, which are executed inside of the Kong worker process. Still, simple interactions should not take as long as the 40-100 ms that you report. Can you provide us with a way to reproduce your issue in a standalone fashion?

@hanshuebner hanshuebner added the pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... label Mar 21, 2023
@stale
Copy link

stale bot commented Apr 6, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 6, 2023
@hbagdi
Copy link
Member

hbagdi commented Apr 6, 2023

Closing this due to lack of activity. Please re-open if needed.

@hbagdi hbagdi closed this as completed Apr 6, 2023
lhanjian pushed a commit that referenced this issue Dec 23, 2024
* tests(rbac): fix 01-rbac/01-rbac_spec.lua (#10463)

* db(dao/workspaces): check kong.conf in select_by_name

* fix 01-rbac/01-rbac_spec.lua

* tests(keyring): pagesize must not be less than 2 (#10462)

* (keyring): pagesize must not be less than 2

* comments

* math.max

* fix(*): remove hardcoded size 1000 from :each interface call (#10480)

* set ws_id nil in tests (#10488)

* fix(incremental sync): fix bug that CP generates entity without expanding foreigns (#10526)

* fix(incremental sync): fix bug that CP generates entity without expanding foreigns

* added XXX EE only

* chore: fallback workspace (#10469)

* remove field_ws_id

* Revert "remove field_ws_id"

This reverts commit 880f5dac107364c7df9800b910631ce1c94451b2.

---------

Co-authored-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale
Projects
None yet
Development

No branches or pull requests

4 participants