apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
167 stars 69 forks source link

request help: Why apisix-go-plguin have performed very poorly #79

Closed tacklong closed 2 years ago

tacklong commented 2 years ago

Issue description

use lua-fault-injection return message,its performance is normal,but, use go-plguin-say return message, which have performed very poorly

Environment

path:/hello,lua-fault-injection path:/get,go-plguin-say H305ijmyYd

spacewander commented 2 years ago

The data don't surprise me.

The performance of Lua version is very high because its path is shorter: client -> APISIX -> client

The path of the Go version is: client -> APISIX -> Runner -> APISIX -> client.

For a regular path (client -> APISIX -> [Runner -> APISIX ->] upstream -> APISIX -> client), requests go through the runner will be 50% slower because of the RPC overhead.

The RPC overhead is high when it is measured with a simple Hello world case.