mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anuradha <anua...@yahoo.com>
Subject Re: apache mina server with 4 ports opened
Date Tue, 08 Nov 2011 12:41:20 GMT
Emmanuel Lecharny <elecharny@...> writes:

> 
> On 11/8/11 12:27 PM, Anuradha wrote:
> > Hi,
> >
> > I have written an apache server program in which, i am presently listening 
on
> > one port 9123.
> > How can we modify the server program to listen on 4 ports ,and if we have
> > 100requests opened from clients ,each port should process 25 requests,and 
this
> > handling should be done in round robin fashion.
> 
> Assuming you are using MINA 2, you can bind as many port as you like, 
> using the :
> *void bind(SocketAddress firstLocalAddress, SocketAddress... addresses) 
> throws IOException*
> method, or the
> void bind(Iterable<? extends SocketAddress> localAddresses) throws 
> IOException
> method.
> 
Thank u Emmanuel
 
I have written  
acceptor.bind(new InetSocketAddress(9123),new InetSocketAddress(9124),new 
InetSocketAddress(9125),new InetSocketAddress(9126));
to  accept connections on 4 ports, but i am not sure how client requests are 
distributed to these ports  do we need to do anything here to load balence on 
each port so that each port is used 






Mime
View raw message