Best practices for leaf nodes - NTP

This is a discussion on Best practices for leaf nodes - NTP ; Can anyone point me to a document that describes best practices for a leaf node using SNTP to synchronize its local clock? I am particularly interested in recommendations regarding how often to poll the server and how to behave if ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Best practices for leaf nodes

  1. Best practices for leaf nodes

    Can anyone point me to a document that describes best practices for a
    leaf node using SNTP to synchronize its local clock? I am particularly
    interested in recommendations regarding how often to poll the server and
    how to behave if no answer is received.

    Note that I am not interested in using the full NTP protocol and
    algorithm - I just want to keep the local clock correct to within a
    second or so using as little code as possible.

    DES
    --
    Dag-Erling Smørgrav - des@des.no

  2. Re: Best practices for leaf nodes

    On 2007-11-28, Dag-Erling Smørgrav wrote:

    > I am particularly interested in recommendations regarding how often to
    > poll the server


    ntpd has a default maximum poll period of 1024 seconds (or ~17 minutes).

    I'd try to poll no often than that. Use an even longer poll period if
    you can.

    > and how to behave if no answer is received.


    Don't start hammering on the server.

    ntpd allows 8 missed polls to occur before a peer is considered to be
    unreachable. You may wish to adopt a similar strategy.

    --
    Steve Kostecke
    NTP Public Services Project - http://support.ntp.org/

  3. Re: Best practices for leaf nodes

    "Steve Kostecke" wrote in message
    news:slrnfkqvo6.orf.kostecke@stasis.kostecke.net.. .
    > On 2007-11-28, Dag-Erling Smørgrav wrote:

    [...]
    >> and how to behave if no answer is received.

    >
    > Don't start hammering on the server.


    This bears fleshing out, since it's not obvious - although it's
    one of those ideas that are obvious in hindsight.

    If there is no answer, don't start knocking faster. Start knocking
    _slower_. The technical term is 'exponential backoff', because the
    usual implementation is to double the interval every time.

    The idea is that missing a beat isn't immediately disastrous, but
    hammering a momentarily or permanently absent server is. Especially
    if you are an over-the-counter DSL router and you have half a
    million brothers and sisters.

    If the server is away for only a moment, you should NOT retry once
    a second until it's back. You can live with a lost sample, but if
    there are enough clients with the same behaviour, that server may
    never get its backlog cleared because it's orders of magnitude
    above regular traffic levels.

    If the server is gone forever, you _definitely_ don't want to keep
    flooding its network for all eternity.

    Groetjes,
    Maarten Wiltink



  4. Re: Best practices for leaf nodes

    Dag-Erling Smørgrav wrote:
    > Can anyone point me to a document that describes best practices for a
    > leaf node using SNTP to synchronize its local clock? I am particularly
    > interested in recommendations regarding how often to poll the server and
    > how to behave if no answer is received.
    >


    Do NOT poll the server more often than once in 64 seconds! If you get no
    reply from a server, double the interval after each failure until you
    get to 1024 seconds. If you get no reply after twenty-four hours, quit
    wasting your time and network bandwidth and try a different server.

    This is documented in the RFCs for NTP and SNTP (RFC-1305 and RFC-4330.

    http://www.eecis.udel.edu/~mills/dat...fc/rfc4330.txt

    I think you'll find RFC-1305 nearby but I'm too lazy to look it up for you.

    Given the limitations of SNTP it is probably sufficient to poll two or
    three times a day.

    Thank you for inquiring. Several people have created mini-disasters by
    getting this wrong. See; e.g.
    http://pages.cs.wisc.edu/~plonka/netgear-sntp/


  5. Re: Best practices for leaf nodes

    Dag-Erling,

    rfc4330.

    Dave

    Dag-Erling Smørgrav wrote:
    > Can anyone point me to a document that describes best practices for a
    > leaf node using SNTP to synchronize its local clock? I am particularly
    > interested in recommendations regarding how often to poll the server and
    > how to behave if no answer is received.
    >
    > Note that I am not interested in using the full NTP protocol and
    > algorithm - I just want to keep the local clock correct to within a
    > second or so using as little code as possible.
    >
    > DES


  6. Re: Best practices for leaf nodes

    "David L. Mills" writes:
    > Dag-Erling,
    >
    > rfc4330.


    Thank you. I had read RFC 2030 (top Google hit for "SNTP RFC"), and did
    not realize it had been superseded. RFC 4330 does indeed contain the
    information I was looking for.

    DES
    --
    Dag-Erling Smørgrav - des@des.no

+ Reply to Thread