Graceful shutdown

rajks rajks at hotmail.com
Fri Nov 20 14:24:15 EST 2009


Thank you for taking time to look into my query.

On using one or more channel groups - your input is very helpful and I will
take that in mind while designing.

On using a single channel factory - I will use a single channel factory on
all back end  connections.

In my SERVER pipeline I am using the OMA thread pool.

In that case when I make outgoing/ back end  connections on the server, I
would need a outgoing pipeline.

Can I use the same OMA thread pool that the SERVER pipeline uses or do I
need to have a different instance of a OMA thread pool for the back end
pipeline.

Thanks
Raj


Trustin Lee wrote:
> 
> Hi,
> 
> On Mon, Nov 9, 2009 at 12:17 PM, rajks <rajks at hotmail.com> wrote:
>>
>> Hi,
>>
>> I am using the netty HTTP server example as the base and I am also using
>> the
>> http client as the backend.
>>
>> 1. Since the server is creating a server factory and client factory, do I
>> need to use two individual channelgroups to add channels of server and
>> backend clients respectively or use a single channelgroup for both the
>> server and client backend channels - to do graceful shutdown. I am using
>> the
>> graceful shutdown method described by TL in the forum.
> 
> If you don't care about the order where the channels are closed, it's
> just fine with one ChannelGroup.
> 
>> 2. MY server will receive http requests  and make a backend http calls to
>> different servers.
>>    Do I need to create/maintain a MAP of { client factory, host:port} and
>> reuse the factory or do I need to create a separate factory everytime for
>> every connection. The backend connections may or may not be persistent.
> 
> You should reuse the ChannelFactory for all connections.  You don't
> even need a map.  You need only one factory that handles all outgoing
> connections.
> 
> HTH
> 
> — Trustin Lee, http://gleamynode.net/
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Graceful-shutdown-tp3970981p4039570.html
Sent from the Netty User Group mailing list archive at Nabble.com.



More information about the netty-users mailing list