You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Shahab Yunus <sh...@gmail.com> on 2013/07/19 23:08:03 UTC

Auto Discovery of Hosts by Clients

Hello,

I want my Thrift client(s) (using hector 1.1-3) to randomly connect to any
node in the Cassandra (1.2.4) cluster.

1- One way is that I pass in a comma separated list of hosts and ports to
the CassandraHostConfguration object.
2- The other option is that I configure the auto discovery of hosts
(through setAutoDiscoverHost and related methods) on
CassandraHostConfguration object while passing only one pair of host/port.

Is one way better than another or both have their pros and cons according
to the usecase. In case of 1, it can become unwieldy if the cluster grows.
In number 2, would I have to be extra careful while adding/removing nodes
(will it conflict with bootstrapping) or is it business as usual?

I don't expect to have a multi-DC setup for near future but I believe that
would be one consideration.

Is there any other method that I am missing? Is it dependent or varies with
the client API that I am using?


Thanks a lot.

Regards,
Shahab

Re: Auto Discovery of Hosts by Clients

Posted by Shahab Yunus <sh...@gmail.com>.
Thanks for you replies.

Regards,
Shahab


On Sun, Jul 21, 2013 at 4:49 PM, aaron morton <aa...@thelastpickle.com>wrote:

> Give the app the same nodes you have in the seed lists.
>
> Cheers
>
> -----------------
> Aaron Morton
> Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 20/07/2013, at 9:32 AM, sankalp kohli <ko...@gmail.com> wrote:
>
> With Auto discovery, you can provide the DC you are local to and it will
> only use hosts from that.
>
>
> On Fri, Jul 19, 2013 at 2:08 PM, Shahab Yunus <sh...@gmail.com>wrote:
>
>> Hello,
>>
>> I want my Thrift client(s) (using hector 1.1-3) to randomly connect to
>> any node in the Cassandra (1.2.4) cluster.
>>
>> 1- One way is that I pass in a comma separated list of hosts and ports to
>> the CassandraHostConfguration object.
>> 2- The other option is that I configure the auto discovery of hosts
>> (through setAutoDiscoverHost and related methods) on
>> CassandraHostConfguration object while passing only one pair of host/port.
>>
>> Is one way better than another or both have their pros and cons according
>> to the usecase. In case of 1, it can become unwieldy if the cluster grows.
>> In number 2, would I have to be extra careful while adding/removing nodes
>> (will it conflict with bootstrapping) or is it business as usual?
>>
>> I don't expect to have a multi-DC setup for near future but I believe
>> that would be one consideration.
>>
>> Is there any other method that I am missing? Is it dependent or varies
>> with the client API that I am using?
>>
>>
>> Thanks a lot.
>>
>> Regards,
>> Shahab
>>
>
>
>

Re: Auto Discovery of Hosts by Clients

Posted by aaron morton <aa...@thelastpickle.com>.
Give the app the same nodes you have in the seed lists. 

Cheers

-----------------
Aaron Morton
Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 20/07/2013, at 9:32 AM, sankalp kohli <ko...@gmail.com> wrote:

> With Auto discovery, you can provide the DC you are local to and it will only use hosts from that. 
> 
> 
> On Fri, Jul 19, 2013 at 2:08 PM, Shahab Yunus <sh...@gmail.com> wrote:
> Hello,
> 
> I want my Thrift client(s) (using hector 1.1-3) to randomly connect to any node in the Cassandra (1.2.4) cluster.
> 
> 1- One way is that I pass in a comma separated list of hosts and ports to the CassandraHostConfguration object. 
> 2- The other option is that I configure the auto discovery of hosts (through setAutoDiscoverHost and related methods) on CassandraHostConfguration object while passing only one pair of host/port. 
> 
> Is one way better than another or both have their pros and cons according to the usecase. In case of 1, it can become unwieldy if the cluster grows. In number 2, would I have to be extra careful while adding/removing nodes (will it conflict with bootstrapping) or is it business as usual?
> 
> I don't expect to have a multi-DC setup for near future but I believe that would be one consideration.
> 
> Is there any other method that I am missing? Is it dependent or varies with the client API that I am using?
> 
> 
> Thanks a lot.
> 
> Regards,
> Shahab
> 


Re: Auto Discovery of Hosts by Clients

Posted by sankalp kohli <ko...@gmail.com>.
With Auto discovery, you can provide the DC you are local to and it will
only use hosts from that.


On Fri, Jul 19, 2013 at 2:08 PM, Shahab Yunus <sh...@gmail.com>wrote:

> Hello,
>
> I want my Thrift client(s) (using hector 1.1-3) to randomly connect to any
> node in the Cassandra (1.2.4) cluster.
>
> 1- One way is that I pass in a comma separated list of hosts and ports to
> the CassandraHostConfguration object.
> 2- The other option is that I configure the auto discovery of hosts
> (through setAutoDiscoverHost and related methods) on
> CassandraHostConfguration object while passing only one pair of host/port.
>
> Is one way better than another or both have their pros and cons according
> to the usecase. In case of 1, it can become unwieldy if the cluster grows.
> In number 2, would I have to be extra careful while adding/removing nodes
> (will it conflict with bootstrapping) or is it business as usual?
>
> I don't expect to have a multi-DC setup for near future but I believe that
> would be one consideration.
>
> Is there any other method that I am missing? Is it dependent or varies
> with the client API that I am using?
>
>
> Thanks a lot.
>
> Regards,
> Shahab
>