You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Andreas Fritzler <an...@gmail.com> on 2016/10/24 12:04:33 UTC

Transparent Fail-Over for Java Driver to survive Cluster Rolling

Hi,

I was wondering if it is enough to set a list of contact points via:

Cluster.builder().addContactPoint("host1").addContactPoint("host2")...;

to survive a cluster rolling while inserting/reading from the cluster.

Regards,
Andreas

Re: Transparent Fail-Over for Java Driver to survive Cluster Rolling

Posted by Hannu Kröger <hk...@gmail.com>.
Hi,

QUORUM would go through if only one node is down any given time.

Depending on the consistency requirements of your application, you could also use ONE (or LOCAL_ONE) as well for sensor reading storage. That would go through even if two nodes are down any given time.

BR,
Hannu

> On 24 Oct 2016, at 15:27, Andreas Fritzler <an...@gmail.com> wrote:
> 
> Thanks a lot Hannu! 
> 
> How about the write path though. What consistency level would I choose if I want to insert e.g. sensor data into my cluster without the app crashing every time I up update the cluster? I would assume that QUORUM (replication of 3) might not always go through?
> 
> 
> 
> On Mon, Oct 24, 2016 at 2:09 PM, Hannu Kröger <hkroger@gmail.com <ma...@gmail.com>> wrote:
> Hi,
> 
> Once the client is connected, it will automatically connect to many nodes in the cluster. Therefore once the app is running the amount of contact points doesn’t matter and if you have consistency level < ALL (or QUORUM where replication factor is <= 2), your app should tolerate rolling restart ok.
> 
> That being said, you should have more than one contact point because if you restart your application and the node indicated in contact point happens to be down, the application cannot connect to cluster and fails. Having two contact points is a good start.
> 
> Cheers,
> Hannu
> 
> 
>> On 24 Oct 2016, at 15:04, Andreas Fritzler <andreas.fritzler@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I was wondering if it is enough to set a list of contact points via:
>> 
>> Cluster.builder().addContactPoint("host1").addContactPoint("host2")...;
>> to survive a cluster rolling while inserting/reading from the cluster.
>> 
>> Regards,
>> Andreas
> 
> 


Re: Transparent Fail-Over for Java Driver to survive Cluster Rolling

Posted by Andreas Fritzler <an...@gmail.com>.
Thanks a lot Hannu!

How about the write path though. What consistency level would I choose if I
want to insert e.g. sensor data into my cluster without the app crashing
every time I up update the cluster? I would assume that QUORUM (replication
of 3) might not always go through?



On Mon, Oct 24, 2016 at 2:09 PM, Hannu Kröger <hk...@gmail.com> wrote:

> Hi,
>
> Once the client is connected, it will automatically connect to many nodes
> in the cluster. Therefore once the app is running the amount of contact
> points doesn’t matter and if you have consistency level < ALL (or QUORUM
> where replication factor is <= 2), your app should tolerate rolling restart
> ok.
>
> That being said, you should have more than one contact point because if
> you restart your application and the node indicated in contact point
> happens to be down, the application cannot connect to cluster and fails.
> Having two contact points is a good start.
>
> Cheers,
> Hannu
>
>
> On 24 Oct 2016, at 15:04, Andreas Fritzler <an...@gmail.com>
> wrote:
>
> Hi,
>
> I was wondering if it is enough to set a list of contact points via:
>
> Cluster.builder().addContactPoint("host1").addContactPoint("host2")...;
>
> to survive a cluster rolling while inserting/reading from the cluster.
>
> Regards,
> Andreas
>
>
>

Re: Transparent Fail-Over for Java Driver to survive Cluster Rolling

Posted by Hannu Kröger <hk...@gmail.com>.
Hi,

Once the client is connected, it will automatically connect to many nodes in the cluster. Therefore once the app is running the amount of contact points doesn’t matter and if you have consistency level < ALL (or QUORUM where replication factor is <= 2), your app should tolerate rolling restart ok.

That being said, you should have more than one contact point because if you restart your application and the node indicated in contact point happens to be down, the application cannot connect to cluster and fails. Having two contact points is a good start.

Cheers,
Hannu


> On 24 Oct 2016, at 15:04, Andreas Fritzler <an...@gmail.com> wrote:
> 
> Hi,
> 
> I was wondering if it is enough to set a list of contact points via:
> 
> Cluster.builder().addContactPoint("host1").addContactPoint("host2")...;
> to survive a cluster rolling while inserting/reading from the cluster.
> 
> Regards,
> Andreas