lhotari commented on PR #17870:
URL: https://github.com/apache/pulsar/pull/17870#issuecomment-1262048972

   > If the internal client uses a lot of threads or the exception handling is 
not good (such as frequent exception thread). It will affect the throughput of 
the entire broker.
   
   please elaborate more on this. What do you mean with "internal client uses a 
lot of threads" or "exception handling is not good"? Please provide examples.
   
   I can see why this is needed since the Pulsar code is not non-blocking. 
Running synchronized methods on Netty IO threads is harmful since it will 
become a performance bottleneck. We should make these problems visible and 
eventually address them.
   
   To detect blocking code, there's https://github.com/reactor/BlockHound that 
could be used. [Netty comes with BlockHound 
integration](https://github.com/netty/netty/blob/4.1/common/src/main/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration).
 BlockHound could be used in unit tests and integration tests to ensure that 
blocking method calls aren't done on Netty IO threads. With Pulsar we'd have 
long ways to fullfil this requirement. This just shows that we need a better 
concurrency model to guide the future development of Pulsar in Pulsar 3.0 and 
beyond that. The current situation is more or less a mess from a concurrency 
model perspective.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to