apisix-java-plugin-runner icon indicating copy to clipboard operation
apisix-java-plugin-runner copied to clipboard

RpcCallHandler is dispatched on the IO thread

Open oridag opened this issue 3 years ago • 4 comments

The RpcCallHandler is not assigned a thread pool, which means only a single request can be handled concurrently. This is a show stopper for high throughput systems.

To process the request asynchronously, use the addAfter overload that takes an EventExecutorGroup:

https://netty.io/4.0/api/io/netty/channel/ChannelPipeline.html#addAfter-io.netty.util.concurrent.EventExecutorGroup-java.lang.String-java.lang.String-io.netty.channel.ChannelHandler-

oridag avatar Jul 19 '22 08:07 oridag

Hmm, I may be wrong here. It's possible this will only block that specific connection's thread, in which case it's ok

oridag avatar Jul 19 '22 20:07 oridag

We can discuss potential ways to optimize the performance of the java plugin runner.

tzssangglass avatar Jul 20 '22 01:07 tzssangglass