You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Supun Kamburugamuva <su...@gmail.com> on 2009/11/10 09:12:14 UTC

Binding nhttp transport to multiple network interfaces

Hi,

Say we have a machine with several network interfaces and Synapse is running
on it. Is it possible to bind some of these interfaces to Synapse nhttp
transport server side and some of them to nhttp transport client side. For
example is it possible to bind to 2 network interfaces from the server side
and to one network interface from the client side?

Thanks,
Supun..

-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Re: Binding nhttp transport to multiple network interfaces

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi,

I've changed the code to have two endpoints. Still I couldn't test it
properly. I have two network interfaces in my machine. But still couldn't
connect them to two networks :). I tried using loop back interface and
wireless interface. But not sure this is a real network scenario to test.

Thanks,
Supun..

On Wed, Nov 11, 2009 at 5:19 AM, Supun Kamburugamuva <su...@gmail.com>wrote:

> Hi Oleg,
>
> Thanks for the tip. I'll add several endpoints to IOReactor to listen and
> try to see weather it is working.
>
> Thanks,
> Supun..
>
>
> On Wed, Nov 11, 2009 at 2:56 AM, Oleg Kalnichevski <ol...@apache.org>wrote:
>
>> Hubert, Eric wrote:
>>
>>> Hi Supun,
>>>
>>>
>>> I think your understanding is correct and there is currently no way to
>>> address this requirement (if it is one).
>>>
>>>
>>> The ListeningIORector of HTTP Core NIO is used with one ListenerEndpoint.
>>> I guess one would need to extend HttpCoreNIOListener to support multiple
>>> ListenerEndpoints. Actually Oleg and Asankha should know much better. I have
>>> never thought about this… I think the Http Core NIO Lib, should be able to
>>> cope with this.
>>>
>>>
>> One can actually open multiple listener endpoints on a single
>> ListeningIORector and bind them to different physical interfaces. One thing
>> I am not sure, though, if all of them can listen on the same port.
>>
>> Oleg
>>
>>
>>
>>
>>> Regards,
>>>
>>>   Eric
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> If I understood the configuration correctly it can bind to one
>>> interface/network address or all of them. Is there a way to bind to
>>> something like to 2 out of 4 interfaces?
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>>
>
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.org
> supunk.blogspot.com
>
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Re: Binding nhttp transport to multiple network interfaces

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Oleg,

Thanks for the tip. I'll add several endpoints to IOReactor to listen and
try to see weather it is working.

Thanks,
Supun..

On Wed, Nov 11, 2009 at 2:56 AM, Oleg Kalnichevski <ol...@apache.org> wrote:

> Hubert, Eric wrote:
>
>> Hi Supun,
>>
>>
>> I think your understanding is correct and there is currently no way to
>> address this requirement (if it is one).
>>
>>
>> The ListeningIORector of HTTP Core NIO is used with one ListenerEndpoint.
>> I guess one would need to extend HttpCoreNIOListener to support multiple
>> ListenerEndpoints. Actually Oleg and Asankha should know much better. I have
>> never thought about this… I think the Http Core NIO Lib, should be able to
>> cope with this.
>>
>>
> One can actually open multiple listener endpoints on a single
> ListeningIORector and bind them to different physical interfaces. One thing
> I am not sure, though, if all of them can listen on the same port.
>
> Oleg
>
>
>
>
>> Regards,
>>
>>   Eric
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> If I understood the configuration correctly it can bind to one
>> interface/network address or all of them. Is there a way to bind to
>> something like to 2 out of 4 interfaces?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Re: Binding nhttp transport to multiple network interfaces

Posted by Oleg Kalnichevski <ol...@apache.org>.
Hubert, Eric wrote:
> Hi Supun,
> 
>  
> 
> I think your understanding is correct and there is currently no way to 
> address this requirement (if it is one).
> 
>  
> 
> The ListeningIORector of HTTP Core NIO is used with one 
> ListenerEndpoint. I guess one would need to extend HttpCoreNIOListener 
> to support multiple ListenerEndpoints. Actually Oleg and Asankha should 
> know much better. I have never thought about this… I think the Http Core 
> NIO Lib, should be able to cope with this.
> 

One can actually open multiple listener endpoints on a single 
ListeningIORector and bind them to different physical interfaces. One 
thing I am not sure, though, if all of them can listen on the same port.

Oleg


>  
> 
> Regards,
> 
>    Eric
> 
>  
> 
>  
> 
> ------------------------------------------------------------------------
> 
> If I understood the configuration correctly it can bind to one 
> interface/network address or all of them. Is there a way to bind to 
> something like to 2 out of 4 interfaces?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


RE: Binding nhttp transport to multiple network interfaces

Posted by "Hubert, Eric" <Er...@foxmobile.com>.
Hi Supun,

I think your understanding is correct and there is currently no way to address this requirement (if it is one).


The ListeningIORector of HTTP Core NIO is used with one ListenerEndpoint. I guess one would need to extend HttpCoreNIOListener to support multiple ListenerEndpoints. Actually Oleg and Asankha should know much better. I have never thought about this… I think the Http Core NIO Lib, should be able to cope with this.



Regards,

   Eric





________________________________
If I understood the configuration correctly it can bind to one interface/network address or all of them. Is there a way to bind to something like to 2 out of 4 interfaces?


Re: Binding nhttp transport to multiple network interfaces

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi,

If I understood the configuration correctly it can bind to one
interface/network address or all of them. Is there a way to bind to
something like to 2 out of 4 interfaces?

Thanks,
Supun..

On Tue, Nov 10, 2009 at 11:02 PM, Hubert, Eric <Er...@foxmobile.com>wrote:

>  Hi Supun,
>
>
>
> Asankha is referring to the parameter “bind-address" of transportReceiver
> in axis2.xml.
>
>
>
> Please refer to
> http://people.apache.org/~veithen/synapse/transports.html#Transport_listener_parameters<http://people.apache.org/%7Eveithen/synapse/transports.html#Transport_listener_parameters>for more detail!
>
>
>
> Regards,
>
>    Eric
>
>
>
> PS: Once again many thanks to Andreas for improving the docu on trunk!
>
>
>
>
> Can you please point me to the configuration for server side? Is it in the
> nhttp.properties file or axis2.xml?
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

RE: Binding nhttp transport to multiple network interfaces

Posted by "Hubert, Eric" <Er...@foxmobile.com>.
Hi Supun,

Asankha is referring to the parameter “bind-address" of transportReceiver in axis2.xml.

Please refer to http://people.apache.org/~veithen/synapse/transports.html#Transport_listener_parameters for more detail!

Regards,
   Eric

PS: Once again many thanks to Andreas for improving the docu on trunk!


Can you please point me to the configuration for server side? Is it in the nhttp.properties file or axis2.xml?


Re: Binding nhttp transport to multiple network interfaces

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Ansnka,

Can you please point me to the configuration for server side? Is it in the
nhttp.properties file or axis2.xml?

Thanks,
Supun..

On Tue, Nov 10, 2009 at 6:26 PM, Asankha C. Perera <as...@apache.org>wrote:

> Hi Supun
> > Say we have a machine with several network interfaces and Synapse is
> > running on it. Is it possible to bind some of these interfaces to
> > Synapse nhttp transport server side and some of them to nhttp
> > transport client side. For example is it possible to bind to 2 network
> > interfaces from the server side and to one network interface from the
> > client side?
> This is possible and already configurable for the Server side.. We've
> not exposed this for the client side but would be a simple and similar
> enhancement
>
> cheers
> asankha
>
> --
> Asankha C. Perera
> AdroitLogic, http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Re: Binding nhttp transport to multiple network interfaces

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Supun
> Say we have a machine with several network interfaces and Synapse is
> running on it. Is it possible to bind some of these interfaces to
> Synapse nhttp transport server side and some of them to nhttp
> transport client side. For example is it possible to bind to 2 network
> interfaces from the server side and to one network interface from the
> client side?
This is possible and already configurable for the Server side.. We've
not exposed this for the client side but would be a simple and similar
enhancement

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org