Thank you a lot, that works great for me.

On Friday, September 1, 2017 at 2:27:27 PM UTC+8, Rogan Dawes wrote:
>
> Use a separate workerGroup to run the final handler?
>
> From https://netty.io/4.0/api/io/netty/channel/ChannelPipeline.html 
> <https://www.google.com/url?q=https%3A%2F%2Fnetty.io%2F4.0%2Fapi%2Fio%2Fnetty%2Fchannel%2FChannelPipeline.html&sa=D&sntz=1&usg=AFQjCNHuINDmsmGElPqf8o94lJzZ6d3JQA>
> :
>
>  ChannelPipeline 
> <https://netty.io/4.0/api/io/netty/channel/ChannelPipeline.html> pipeline = 
> ch.pipeline();
>
>  pipeline.addLast("decoder", new MyProtocolDecoder());
>  pipeline.addLast("encoder", new MyProtocolEncoder());
>
>  // Tell the pipeline to run MyBusinessLogicHandler's event handler methods
>  // in a different thread than an I/O thread so that the I/O thread is not 
> blocked by
>  // a time-consuming task.
>  // If your business logic is fully asynchronous or finished very quickly, 
> you don't
>  // need to specify a group.
>  pipeline.addLast(group, "handler", new MyBusinessLogicHandler());
>
> Rogan
>
>
> On Fri, Sep 1, 2017 at 8:09 AM Johnson Li <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I have used Netty as an HTTP/2 server for a period of time and found that 
>> it did not take full advantage of HTTP/2 multiplexing. What I mean is that 
>> Netty handles all HTTP/2 streams in one thread if they come from the same 
>> TCP connection. But that is not expected because HTTP/2 merges multiple TCP 
>> connections into one, and let the HTTP/2 to handle the concurrency. So the 
>> application handler should run concurrently to handle concurrent HTTP/2 
>> streams.
>>
>> One simple phenomenon is that if I set up an HTTP/2 client and an HTTP/2 
>> server, letting the client sends requests quickly. But the CPU usage of the 
>> server will never exceed 100%, which means it only uses one CPU core. That 
>> will cause performance issues if the server is busy with making responses.
>>
>> Any thoughts?
>>
>> Johnson
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Netty discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/netty/9a11955a-b0cf-4998-9b9f-d6f1335d3965%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/netty/9a11955a-b0cf-4998-9b9f-d6f1335d3965%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/413b314b-5a89-4660-a782-66bd011f42fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to