You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/11/03 14:51:09 UTC
Why we have multiple hostnames for a single cluster
Hi,
According to the code, a cluster object's host names is a list. When there
can be multiple host names per a single cluster.
If someone wants to get the host name of LB cluster, which one to pick, is
it the first host name?
--
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
Re: Why we have multiple hostnames for a single cluster
Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Udara,
As you have mentioned, it will pick up the first hostname in the LB. I
found it from the below code segment:
String hostname = cluster.getHostNames().get(0);
if (cluster.getHostNames().size() > 1) {
if (log.isWarnEnabled()) {
log.warn(String.format("Multiple hostnames found in cluster
%s, using %s",
cluster.getHostNames().toString(), hostname));
}
}
Thanks,
Reka
On Mon, Nov 3, 2014 at 7:21 PM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi,
>
> According to the code, a cluster object's host names is a list. When there
> can be multiple host names per a single cluster.
> If someone wants to get the host name of LB cluster, which one to pick, is
> it the first host name?
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007