Clarity needed on Key based batching behaviour #24343
Replies: 2 comments
-
It seems that there's a discussion about this in #7800 (comment).
@joshua-motorq What is your definition of a "single network request" in this case? I can only answer about the Java client and the Broker. I don't know the C++ client so well to answer the question. I'm assuming that the "single network request" question is related to minimizing the number of syscalls. In Netty, which is used in the Broker and in the Pulsar Java client, there are optimizations to minimize syscalls. For receiving data, the amount of syscalls is minimized with Netty's epoll support. The Netty pipeline is defined for the broker in the org.apache.pulsar.broker.service.PulsarChannelInitializer class . The Java client uses org.apache.pulsar.client.impl.PulsarChannelInitializer. For sending responses from the broker (and sending requests from the client), there's a syscall optimization with FlushConsolidationHandler. That's essentially what handles putting more than one Pulsar command/response in a "single network request" when Pulsar broker sends responses or Pulsar Java client sends requests. For the Pulsar Java client, multiple batches can go out in a single network request, if this is how we'd define it. |
Beta Was this translation helpful? Give feedback.
-
@lhotari Thanks for the clarification, I got the the necessary clarification on this question from BewareMyPower's answers in #7800 ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
#7996
^ Adds Key based batching support to the C++ client
Key based batching in general,
Are network requests optimised in such a way that multiple batches (each for different keys) can go out in a single network request?
Beta Was this translation helpful? Give feedback.
All reactions