You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Anuj Wadehra <an...@yahoo.co.in> on 2016/11/26 19:20:06 UTC

Configure NTP for Cassandra

Hi,
One popular NTP setup recommended for Cassandra users is described at 
Thankshttps://blog.logentries.com/2014/03/synchronizing-clocks-in-a-cassandra-cluster-pt-2-solutions/ .
Summary of article is:Setup recommends a dedicated pool of internal NTP servers which are associated as peers to provide a HA NTP service. Cassandra nodes sync to this dedicated pool but define one internal NTP server as preferred server to ensure relative clock synchronization. Internal NTP servers sync to external NTP servers.
My questions:
1. If my ISP provider is providing me a pool of reliable NTP servers, should I setup my own internal servers anyway or can I sync Cassandra nodes directly to the ISP provided servers and select one of the servers as preferred for relative clock synchronization?

I agree. If you have to rely on public NTP pool which selects random servers for sync, having an internal NTP server pool is justified for getting tight relative sync as described in the blog 
2. As per my understanding, peer association is ONLY for backup scenario . If a peer loses time synchronization source, then other peers can be used for time synchronization. Thus providing a HA service. But when everything is ok (happy path), does defining NTP servers synced from different sources as peers lead them to converge time as mentioned in some forums?
e.g. if A and B are peers and thier times are 9:00:00 and 9:00:10 after syncing with respective time sources, then will they converge their clocks as 9:00:05?
I doubt the above claim regarding time converge. Also no formal doc says that. Comments?

ThanksAnuj

Re: Configure NTP for Cassandra

Posted by Anuj Wadehra <an...@yahoo.co.in>.
Thanks for the NTP link. Most of us are Cassandra users and must be using NTP (or other time synchronization methods) for ensuring relative time synchronization in our Cassandra clusters. I hope there are people on the mailing list who can answer these questions with respect to Cassandra. 
There is just one detailed blog on NTP best practices for Cassandra and I think answering these questions is important rather than just creating an internal NTP pool with recommended settings.

Thanks
Anuj 
 
  On Wed, 14 Dec, 2016 at 12:07 AM, Jim Witschey<ji...@datastax.com> wrote:   You might find more NTP experts on the NTP questions mailing list:
http://lists.ntp.org/listinfo/questions

On Tue, Dec 13, 2016 at 1:25 PM, Anuj Wadehra <an...@yahoo.co.in> wrote:
> Any NTP experts willing to take up these questions?
>
> Thanks
> Anuj
>
> On Sun, 27 Nov, 2016 at 12:52 AM, Anuj Wadehra
> <an...@yahoo.co.in> wrote:
> Hi,
>
> One popular NTP setup recommended for Cassandra users is described at
> Thankshttps://blog.logentries.com/2014/03/synchronizing-clocks-in-a-cassandra-cluster-pt-2-solutions/
> .
>
> Summary of article is:
> Setup recommends a dedicated pool of internal NTP servers which are
> associated as peers to provide a HA NTP service. Cassandra nodes sync to
> this dedicated pool but define one internal NTP server as preferred server
> to ensure relative clock synchronization. Internal NTP servers sync to
> external NTP servers.
>
> My questions:
>
> 1. If my ISP provider is providing me a pool of reliable NTP servers, should
> I setup my own internal servers anyway or can I sync Cassandra nodes
> directly to the ISP provided servers and select one of the servers as
> preferred for relative clock synchronization?
>
>
> I agree. If you have to rely on public NTP pool which selects random servers
> for sync, having an internal NTP server pool is justified for getting tight
> relative sync as described in the blog
>
> 2. As per my understanding, peer association is ONLY for backup scenario .
> If a peer loses time synchronization source, then other peers can be used
> for time synchronization. Thus providing a HA service. But when everything
> is ok (happy path), does defining NTP servers synced from different sources
> as peers lead them to converge time as mentioned in some forums?
>
> e.g. if A and B are peers and thier times are 9:00:00 and 9:00:10 after
> syncing with respective time sources, then will they converge their clocks
> as 9:00:05?
>
> I doubt the above claim regarding time converge. Also no formal doc says
> that. Comments?
>
>
> Thanks
> Anuj
>
  

Re: Configure NTP for Cassandra

Posted by Jim Witschey <ji...@datastax.com>.
You might find more NTP experts on the NTP questions mailing list:
http://lists.ntp.org/listinfo/questions

On Tue, Dec 13, 2016 at 1:25 PM, Anuj Wadehra <an...@yahoo.co.in> wrote:
> Any NTP experts willing to take up these questions?
>
> Thanks
> Anuj
>
> On Sun, 27 Nov, 2016 at 12:52 AM, Anuj Wadehra
> <an...@yahoo.co.in> wrote:
> Hi,
>
> One popular NTP setup recommended for Cassandra users is described at
> Thankshttps://blog.logentries.com/2014/03/synchronizing-clocks-in-a-cassandra-cluster-pt-2-solutions/
> .
>
> Summary of article is:
> Setup recommends a dedicated pool of internal NTP servers which are
> associated as peers to provide a HA NTP service. Cassandra nodes sync to
> this dedicated pool but define one internal NTP server as preferred server
> to ensure relative clock synchronization. Internal NTP servers sync to
> external NTP servers.
>
> My questions:
>
> 1. If my ISP provider is providing me a pool of reliable NTP servers, should
> I setup my own internal servers anyway or can I sync Cassandra nodes
> directly to the ISP provided servers and select one of the servers as
> preferred for relative clock synchronization?
>
>
> I agree. If you have to rely on public NTP pool which selects random servers
> for sync, having an internal NTP server pool is justified for getting tight
> relative sync as described in the blog
>
> 2. As per my understanding, peer association is ONLY for backup scenario .
> If a peer loses time synchronization source, then other peers can be used
> for time synchronization. Thus providing a HA service. But when everything
> is ok (happy path), does defining NTP servers synced from different sources
> as peers lead them to converge time as mentioned in some forums?
>
> e.g. if A and B are peers and thier times are 9:00:00 and 9:00:10 after
> syncing with respective time sources, then will they converge their clocks
> as 9:00:05?
>
> I doubt the above claim regarding time converge. Also no formal doc says
> that. Comments?
>
>
> Thanks
> Anuj
>

Re: Configure NTP for Cassandra

Posted by Anuj Wadehra <an...@yahoo.co.in>.
Any NTP experts willing to take up these questions?

Thanks
Anuj 
 
  On Sun, 27 Nov, 2016 at 12:52 AM, Anuj Wadehra<an...@yahoo.co.in> wrote:   Hi,
One popular NTP setup recommended for Cassandra users is described at 
Thankshttps://blog.logentries.com/2014/03/synchronizing-clocks-in-a-cassandra-cluster-pt-2-solutions/ .
Summary of article is:Setup recommends a dedicated pool of internal NTP servers which are associated as peers to provide a HA NTP service. Cassandra nodes sync to this dedicated pool but define one internal NTP server as preferred server to ensure relative clock synchronization. Internal NTP servers sync to external NTP servers.
My questions:
1. If my ISP provider is providing me a pool of reliable NTP servers, should I setup my own internal servers anyway or can I sync Cassandra nodes directly to the ISP provided servers and select one of the servers as preferred for relative clock synchronization?

I agree. If you have to rely on public NTP pool which selects random servers for sync, having an internal NTP server pool is justified for getting tight relative sync as described in the blog 
2. As per my understanding, peer association is ONLY for backup scenario . If a peer loses time synchronization source, then other peers can be used for time synchronization. Thus providing a HA service. But when everything is ok (happy path), does defining NTP servers synced from different sources as peers lead them to converge time as mentioned in some forums?
e.g. if A and B are peers and thier times are 9:00:00 and 9:00:10 after syncing with respective time sources, then will they converge their clocks as 9:00:05?
I doubt the above claim regarding time converge. Also no formal doc says that. Comments?

ThanksAnuj
  

Re: Configure NTP for Cassandra

Posted by Anuj Wadehra <an...@yahoo.co.in>.
Thanks Martin. Agree, setting up our own internal servers will help save some firewall traffic, simplify security management and reduce load on public servers which is an ethical thing to do. As the blog recommended setting up own internal servers for Cassandra, I wanted to make sure that there are no Cassandra specific benefits e.g. better relative time synchronization achieved with an internal setup. So, I would conclude it this way : Even though its not a good practice to directly access external NTP servers via Cassandra nodes, Cassandra can still achieve tight relative time synchronization using reliable external servers. There is no madate to setup your own pool of internal NTP servers for BETTER time synchronization.
Thanks for your inputs.Anuj 
 
  On Wed, 14 Dec, 2016 at 3:22 AM, Martin Schröder<ma...@oneiros.de> wrote:   2016-11-26 20:20 GMT+01:00 Anuj Wadehra <an...@yahoo.co.in>:
> 1. If my ISP provider is providing me a pool of reliable NTP servers, should
> I setup my own internal servers anyway or can I sync Cassandra nodes
> directly to the ISP provided servers and select one of the servers as
> preferred for relative clock synchronization?

Set up three ntp servers which uses the provider servers _and_ pool servers
and sync your other machines from these servers (and maybe get gps receivers
for your ntp servers). This reduces ntp traffic at your firewall (your servers
act as proxies) and reduces load on public servers.

> 2. As per my understanding, peer association is ONLY for backup scenario .
> If a peer loses time synchronization source, then other peers can be used
> for time synchronization. Thus providing a HA service. But when everything
> is ok (happy path), does defining NTP servers synced from different sources
> as peers lead them to converge time as mentioned in some forums?

Maybe; but the difference will be negligible (sub milliseconds).
I wouldn't worry about that.

Best
  Martin
  

Re: Configure NTP for Cassandra

Posted by Martin Schröder <ma...@oneiros.de>.
2016-11-26 20:20 GMT+01:00 Anuj Wadehra <an...@yahoo.co.in>:
> 1. If my ISP provider is providing me a pool of reliable NTP servers, should
> I setup my own internal servers anyway or can I sync Cassandra nodes
> directly to the ISP provided servers and select one of the servers as
> preferred for relative clock synchronization?

Set up three ntp servers which uses the provider servers _and_ pool servers
and sync your other machines from these servers (and maybe get gps receivers
for your ntp servers). This reduces ntp traffic at your firewall (your servers
act as proxies) and reduces load on public servers.

> 2. As per my understanding, peer association is ONLY for backup scenario .
> If a peer loses time synchronization source, then other peers can be used
> for time synchronization. Thus providing a HA service. But when everything
> is ok (happy path), does defining NTP servers synced from different sources
> as peers lead them to converge time as mentioned in some forums?

Maybe; but the difference will be negligible (sub milliseconds).
I wouldn't worry about that.

Best
   Martin