Database Reference
In-Depth Information
Clock synchronization
In Chapter 2 , Cassandra Architecture , we've learned that Cassandra uses a timestamp for
conflict resolution. It is very important to have clocks on each server and client machines to
be synchronized with a reliable central clock to avoid unexpected overwrites.
The most common way to do this is by using the Network Time Protocol ( NTP ) daemon.
It sets the system time in synchronism with the time server, and can maintain time resolu-
tion to within milliseconds. You may check whether your system has NTP installed and
running by executing ntpq -p .
Here is how you install and configure NTP:
1. Install NTP on Fedora/RHEL/CentOS:
$ yum install ntp
2. Install NTP on Debian/Ubuntu:
$ sudo apt-get install ntp
3. Configure time servers (they are most likely, configured already):
$ vi /etc/ntp.conf #open with editor, root access
needed
4. Add server(s) and save:
$ server pool.ntp.org
5. Restart the NTP service:
$ /etc/init.d/ntpd restart
6. Force an immediate update:
$ ntpdate pool.ntp.org
Search WWH ::




Custom Search