You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Narendra Sharma <na...@gmail.com> on 2010/07/13 09:45:08 UTC

Cassandra client - clock sync

Hi,

We have an application that uses Cassandra to store data. The application is
deployed on multiple nodes that are part of an application cluster. We are
at present using single Cassandra node. We have noticed few errors in
application and our analysis revealed that the root cause was that the clock
on different application nodes was off by few miliseconds (approx 3.5 ms).

AFAIK all the application nodes using Cassandra should have clock synched.
Is this understanding correct? If yes, what is the recommended way to keep
the clocks in sync? Even if we use NTP the clocks go out of sync after few
hours. Should we write a cron job to sync time every N minutes or hours?
What is the recommendation in production? How are other Cassandra users
handling the clock sync in production environment?


Thanks,
Naren

Re: Cassandra client - clock sync

Posted by Jonathan Ellis <jb...@gmail.com>.
You should use ntp in daemon mode, not as a one-time fix.
http://linux.die.net/man/1/ntpd

On Tue, Jul 13, 2010 at 2:45 AM, Narendra Sharma
<na...@gmail.com> wrote:
> Hi,
>
> We have an application that uses Cassandra to store data. The application is
> deployed on multiple nodes that are part of an application cluster. We are
> at present using single Cassandra node. We have noticed few errors in
> application and our analysis revealed that the root cause was that the clock
> on different application nodes was off by few miliseconds (approx 3.5 ms).
>
> AFAIK all the application nodes using Cassandra should have clock synched.
> Is this understanding correct? If yes, what is the recommended way to keep
> the clocks in sync? Even if we use NTP the clocks go out of sync after few
> hours. Should we write a cron job to sync time every N minutes or hours?
> What is the recommendation in production? How are other Cassandra users
> handling the clock sync in production environment?
>
>
> Thanks,
> Naren
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: Cassandra client - clock sync

Posted by Benjamin Black <b...@b3k.us>.
On Tue, Jul 13, 2010 at 12:45 AM, Narendra Sharma
<na...@gmail.com> wrote:
>  How are other Cassandra users handling the clock sync in production environment?
>

By structuring access in the app such that there are never conflicts
in the first place, for example by using UUIDs for row and column
names.  At the point you are trying to debug conflicts in
milliseconds, you are in trouble.


b