You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Abhishek Pal (Jira)" <ji...@apache.org> on 2026/08/02 16:50:00 UTC

[jira] [Created] (RATIS-2637) Netty RPC lacks per-connection read backpressure

Abhishek Pal created RATIS-2637:
-----------------------------------

             Summary: Netty RPC lacks per-connection read backpressure
                 Key: RATIS-2637
                 URL: https://issues.apache.org/jira/browse/RATIS-2637
             Project: Ratis
          Issue Type: Improvement
          Components: Netty
            Reporter: Abhishek Pal
            Assignee: Abhishek Pal


After Netty RPC handling is offloaded to a worker pool, NettyRpcService.InboundHandler.channelRead0 reads every inbound request off the socket immediately and chains it as a pending CompletableFuture stage (holding the request proto) on the shared request executor (unbounded LinkedBlockingQueue).

Reads are never paused, so there is no TCP backpressure.

We should  cap in-flight requests per channel and when the cap is reached set `ctx.channel().config().setAutoRead(false)` and re-enable once drained. This bounds memory, restoring TCP backpressure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)