Kong performance with go-plugin #10823
-
|
We are performing performance tests with kong to see what type of plugin works best for us. Our base performance with kong 3.2.2 (no plugins with CPU isolated local application server) We wrote a simple hello-world type of go-plugin with Access/Response and Log handlers. These handlers are just empty returns. But we observe that kong's performance comes down quite a bit. This implies that writing/reading from the local socket itself brings down the performance by 25%. The CPU remains around 200% of the 4 CPUs given to kong docker.
Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
As I understand it, if performance matters and your plugin is a hot path, lua is really the only option. The other language incur an RPC overhead for many operations that operate on the request or response |
Beta Was this translation helpful? Give feedback.
-
|
or build it in C or rust and expose it to lua |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if this is as per kong's design direction, but is loading openresty plugins another way to go about? We have much much better performance in nginx modules than in abstracted kong infra. |
Beta Was this translation helpful? Give feedback.
As I understand it, if performance matters and your plugin is a hot path, lua is really the only option.
The other language incur an RPC overhead for many operations that operate on the request or response