Hi Sidath,

We cannot say that the network is same when the interface name is same.
System admin can configure network interfaces the way they prefer.
Therefore we cannot use network interface name to identify if they are in
the same network. If we want to identify if two network interfaces in the
same network, we have to use a method like checking the subnet using the
netmask. Additionally there can be cases where two interfaces belong to the
two different subsnets which are connected using a router. In this case not
using an interface to connect the broker since it is in a different subnet
is wrong.

On Thu, Oct 6, 2016 at 1:03 PM, Sidath Weerasinghe <sid...@wso2.com> wrote:

> Hi Asanka,
>
> I am using this structure because of client wants to get the IP address
> with is related to client network(Client is in LAN or WiFi). So in this
> structure Andes client get the one of IP and choose the suitable network to
> connect. If I group IP addresses based on the nodes then how can I get the
> suitable IP address which is related to the client network. Then client
> want to check all the IP address on the structure.
>
> On Thu, Oct 6, 2016 at 12:03 PM, Asanka Abeyweera <asank...@wso2.com>
> wrote:
>
>> Hi Sidath,
>>
>> If I understood correctly, we are grouping the IP addresses belonging to
>> different nodes according to their interface name. What was the reason for
>> doing that?
>>
>> With this approach, I do not see a way to identify the IP addresses
>> belonging to a specific node. I think the requirement is to load balance
>> between different MB nodes available in the cluster. Therefore I think it
>> is important to group IP addresses based on the nodes instead of using
>> interface name to group .
>>
>>
>> On Thu, Oct 6, 2016 at 11:42 AM, Sidath Weerasinghe <sid...@wso2.com>
>> wrote:
>>
>>> Hi Asanka,
>>>
>>> Each node can be have different intercaces (LAN, WiFi).
>>> So that I got the those IP and ports of all the interfaces.
>>>
>>> <Eth1> - Wifi
>>> <Eth0> - LAN
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *<?xml version="1.0" encoding="UTF-8"?><IpList>    <Eth1>
>>> <default>            <IP>10.100.4.165:5672
>>> <http://10.100.4.165:5672></IP>            <IP>10.100.4.165:5673
>>> <http://10.100.4.165:5673></IP>        </default>        <ssl>
>>> <IP>10.100.4.165:8672 <http://10.100.4.165:8672></IP>
>>> <IP>10.100.4.165:8673 <http://10.100.4.165:8673></IP>        </ssl>
>>> </Eth1>    <Eth0>        <default>            <IP>192.165.55.20:5672
>>> <http://192.165.55.20:5672></IP>            <IP>192.165.55.20:5673
>>> <http://192.165.55.20:5673></IP>        </default>        <ssl>
>>> <IP>192.165.55.20:8672 <http://192.165.55.20:8672></IP>
>>> <IP>192.165.55.20:8673 <http://192.165.55.20:8673></IP>        </ssl>
>>> </Eth0></IpList>*
>>>
>>>
>>>
>>>
>>> *<Eth1>        <default> - WiFi binded IP address *
>>>
>>> *           <IP>10.100.4.165:5672 <http://10.100.4.165:5672></IP> -
>>> Nodes in cluster           <IP>10.100.4.165:5673
>>> <http://10.100.4.165:5673></IP> - **Nodes in cluster*
>>>
>>>
>>> * <Eth0>        <default> - LAN binded IP address*
>>> *            <IP>192.165.55.20:8672 <http://192.165.55.20:8672></IP> *
>>> *- Nodes in cluster            <IP>192.165.55.20:8673
>>> <http://192.165.55.20:8673></IP> **- Nodes in cluster*
>>>
>>> On Thu, Oct 6, 2016 at 11:15 AM, Asanka Abeyweera <asank...@wso2.com>
>>> wrote:
>>>
>>>> Hi Sidath,
>>>>
>>>> From this structure, how can we differentiate between IP addresses
>>>> belonging to different node?
>>>>
>>>> On Thu, Oct 6, 2016 at 11:09 AM, Sidath Weerasinghe <sid...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Andes client invokes the admin service to get IP address and ports of
>>>>> the live nodes in the cluster.
>>>>> Admin service makes XML structure  and sends that string to the client
>>>>> who invokes the service.
>>>>> .
>>>>> Here is the structure of the XML,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *<?xml version="1.0" encoding="UTF-8"?><IpList>    <Eth1>
>>>>> <default>            <IP>10.100.4.165:5672
>>>>> <http://10.100.4.165:5672></IP>            <IP>10.100.4.165:5673
>>>>> <http://10.100.4.165:5673></IP>        </default>        <ssl>
>>>>> <IP>10.100.4.165:8672 <http://10.100.4.165:8672></IP>
>>>>> <IP>10.100.4.165:8673 <http://10.100.4.165:8673></IP>        </ssl>
>>>>> </Eth1></IpList>*
>>>>>
>>>>> The user can choose the SSL by setting a system property in the client
>>>>> program. Otherwise, it always takes default ones.
>>>>>
>>>>> Any comments ?
>>>>>
>>>>> On Thu, Sep 29, 2016 at 1:39 PM, Sidath Weerasinghe <sid...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Malaka,
>>>>>>
>>>>>> I got the IP address (all network interfaces) and AMQP port and store
>>>>>> database at cluster startup. When node shutdown that details are removed
>>>>>> from the database.
>>>>>> I wrote an admin service to get those database details at the carbon
>>>>>> business module. Inside the client, I call that service.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 29, 2016 at 12:08 PM, Malaka Silva <mal...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Sep 29, 2016 at 10:06 AM, Sidath Weerasinghe <
>>>>>>> sid...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> In Andes client, I implemented a new initialContextFactory and
>>>>>>>> inside that, I made an AMQP URL.
>>>>>>>> Inside the Andes client, I called that web service to get the
>>>>>>>> cluster node IP address and Port details. When calling web service it
>>>>>>>> shuffles  the IP address and gives String to the client. Using this, 
>>>>>>>> create
>>>>>>>> AMQP URL inside the Andes client, Other IPs put as a failover.
>>>>>>>>
>>>>>>> ​What is the web service you called to get the all the members? Can
>>>>>>> this be a single point of failure?
>>>>>>>
>>>>>>>>
>>>>>>>> The client can set failover values as properties.  Inside the new
>>>>>>>> initialContextFactory, read those properties and set failover.
>>>>>>>> "amqp://admin:admin@carbon/carbon?brokerlist='tcp://10.100.4
>>>>>>>> .165:5672?*retries='10'&connectdelay='1000'*;tcp://10.100.4.16
>>>>>>>> 6:5672?
>>>>>>>> *retries='10'&connectdelay='1000''&failover='roundrobin?cyclecount='20'*
>>>>>>>> '"
>>>>>>>>
>>>>>>>> Any ideas for this.
>>>>>>>>
>>>>>>>> On Thu, Sep 22, 2016 at 5:11 PM, Sidath Weerasinghe <
>>>>>>>> sid...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> In MB, the user/developers having to manually list out the IPs in
>>>>>>>>> the connection URL could be difficult. The change of IPs of the broker
>>>>>>>>> nodes would require reconfiguring and restart the client applications
>>>>>>>>> connected to it. I am implementing a way to dynamically detection the 
>>>>>>>>> MB
>>>>>>>>> nodes in the cluster and load balance through them.
>>>>>>>>>
>>>>>>>>> I got the IP address(all network interfaces) and AMQP port and
>>>>>>>>> store database at cluster startup. When node shutdown that details are
>>>>>>>>> removed from the database.
>>>>>>>>> I wrote an admin service to get those database details at the
>>>>>>>>> carbon business module.
>>>>>>>>>
>>>>>>>>> In andes client, I implemented a new initialContextFactory and
>>>>>>>>> inside that, I made an AMQP URL. As a mock, I got the IP list from 
>>>>>>>>> the file
>>>>>>>>> and randomly select one of the IP and port and make AMPQ URL. Other 
>>>>>>>>> IPs
>>>>>>>>>  put as a fail-over. I tested it.
>>>>>>>>>
>>>>>>>>> *Work to be done*
>>>>>>>>> I will call web service inside the andes client and get the IP and
>>>>>>>>> port and resolve it according to the client network. After that get 
>>>>>>>>> the
>>>>>>>>> correct IP and the port.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Thank You,
>>>>>>>>> Best Regards,
>>>>>>>>>
>>>>>>>>> Sidath Weerasinghe
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *Intern*
>>>>>>>>>
>>>>>>>>> *WSO2, Inc. *
>>>>>>>>>
>>>>>>>>> *lean . enterprise . middleware *
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *Mobile: +94719802550 <%2B94719802550>*
>>>>>>>>>
>>>>>>>>> *Email: *sid...@wso2.com
>>>>>>>>>
>>>>>>>>> Blog: https://medium.com/@sidath
>>>>>>>>>
>>>>>>>>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Thank You,
>>>>>>>> Best Regards,
>>>>>>>>
>>>>>>>> Sidath Weerasinghe
>>>>>>>>
>>>>>>>>
>>>>>>>> *Intern*
>>>>>>>>
>>>>>>>> *WSO2, Inc. *
>>>>>>>>
>>>>>>>> *lean . enterprise . middleware *
>>>>>>>>
>>>>>>>>
>>>>>>>> *Mobile: +94719802550 <%2B94719802550>*
>>>>>>>>
>>>>>>>> *Email: *sid...@wso2.com
>>>>>>>>
>>>>>>>> Blog: https://medium.com/@sidath
>>>>>>>>
>>>>>>>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Architecture mailing list
>>>>>>>> Architecture@wso2.org
>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Best Regards,
>>>>>>>
>>>>>>> Malaka Silva
>>>>>>> Senior Technical Lead
>>>>>>> M: +94 777 219 791
>>>>>>> Tel : 94 11 214 5345
>>>>>>> Fax :94 11 2145300
>>>>>>> Skype : malaka.sampath.silva
>>>>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>>>>
>>>>>>> WSO2, Inc.
>>>>>>> lean . enterprise . middleware
>>>>>>> https://wso2.com/signature
>>>>>>> http://www.wso2.com/about/team/malaka-silva/
>>>>>>> <http://wso2.com/about/team/malaka-silva/>
>>>>>>> https://store.wso2.com/store/
>>>>>>>
>>>>>>> Don't make Trees rare, we should keep them with care
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Architecture mailing list
>>>>>>> Architecture@wso2.org
>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thank You,
>>>>>> Best Regards,
>>>>>>
>>>>>> Sidath Weerasinghe
>>>>>>
>>>>>>
>>>>>> *Intern*
>>>>>>
>>>>>> *WSO2, Inc. *
>>>>>>
>>>>>> *lean . enterprise . middleware *
>>>>>>
>>>>>>
>>>>>> *Mobile: +94719802550 <%2B94719802550>*
>>>>>>
>>>>>> *Email: *sid...@wso2.com
>>>>>>
>>>>>> Blog: https://medium.com/@sidath
>>>>>>
>>>>>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thank You,
>>>>> Best Regards,
>>>>>
>>>>> Sidath Weerasinghe
>>>>>
>>>>>
>>>>> *Intern*
>>>>>
>>>>> *WSO2, Inc. *
>>>>>
>>>>> *lean . enterprise . middleware *
>>>>>
>>>>>
>>>>> *Mobile: +94719802550 <%2B94719802550>*
>>>>>
>>>>> *Email: *sid...@wso2.com
>>>>>
>>>>> Blog: https://medium.com/@sidath
>>>>>
>>>>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>>>>>
>>>>> _______________________________________________
>>>>> Architecture mailing list
>>>>> Architecture@wso2.org
>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Asanka Abeyweera
>>>> Senior Software Engineer
>>>> WSO2 Inc.
>>>>
>>>> Phone: +94 712228648
>>>> Blog: a5anka.github.io
>>>>
>>>> <https://wso2.com/signature>
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> Architecture@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> Thank You,
>>> Best Regards,
>>>
>>> Sidath Weerasinghe
>>>
>>>
>>> *Intern*
>>>
>>> *WSO2, Inc. *
>>>
>>> *lean . enterprise . middleware *
>>>
>>>
>>> *Mobile: +94719802550 <%2B94719802550>*
>>>
>>> *Email: *sid...@wso2.com
>>>
>>> Blog: https://medium.com/@sidath
>>>
>>> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>>>
>>
>>
>>
>> --
>> Asanka Abeyweera
>> Senior Software Engineer
>> WSO2 Inc.
>>
>> Phone: +94 712228648
>> Blog: a5anka.github.io
>>
>> <https://wso2.com/signature>
>>
>
>
>
> --
> Thank You,
> Best Regards,
>
> Sidath Weerasinghe
>
>
> *Intern*
>
> *WSO2, Inc. *
>
> *lean . enterprise . middleware *
>
>
> *Mobile: +94719802550 <%2B94719802550>*
>
> *Email: *sid...@wso2.com
>
> Blog: https://medium.com/@sidath
>
> Linkedin: https://lk.linkedin.com/in/sidathweerasinghe
>



-- 
Asanka Abeyweera
Senior Software Engineer
WSO2 Inc.

Phone: +94 712228648
Blog: a5anka.github.io

<https://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to