[ntp:questions] Re: Router Vendor + NTP
Richard B. Gilbert
rgilbert88 at comcast.net
Fri Jun 10 00:51:24 UTC 2005
David Carne wrote:
>I work for a small router vendor, and we're just about to release our
>first product. We plan to use NTP to synchronize the times on our
>devices, but we want to be good netizens, and run our own ntp
>infrastructure for our devices.
>Does anyone have any advice on this? AKA, expectations of what we'll
>need in terms of bandwidth / what kind of server hardware we'll need?
>We expect to have eventually 100k+ devices out there, and the devices
>will probably synchronize one a week or so. [we have no need of really
>really accurate timekeeping].
>So in summary, do you all think I can do this with a single powerful
>box? or should I do something with round robin dns load balancing?
>Apologies for the intrusion, but after reading all the discussion about
>how some router vendors abuse the system, we want to make sure we do
>things the right way.
NTP does not work quite the way you seem to think it does! What you
are asking about sounds a little like SNTP but not exactly.
NTP uses polling intervals between 64 seconds and 17 minutes and
actually tries to discipline the local clock so that it both ticks at
exactly one second per second (frequency) and keeps the correct time
SNTP sends queries about three times per day and corrects the local
clock phase (perhaps the frequency also, I don't use it and don't know
If each of 100K devices send one query per day, randomly, you are
talking about receiving and replying to, about 100K packets per day.
There are 86K seconds in a day so the server will be handling perhaps
two packets every three seconds. A single medium size box should be
able to do this without even breathing hard. Of course if 90K devices
try to hit your server at 5:00PM Eastern Time every day, your server
will melt down on the spot!
The offenses committed by router manufacturers so far seem to be:
A. Hard coding the address of someone else's server without giving
notice or asking permission!
B. Sending queries once per second whether they get a reply or not, and
C. Ignoring the standards for NTP which specify such things as polling
intervals, what to do if a server sends you a "kiss of death" packet,
etc, etc, etc.
For reasons of reliability, you should probably have more than one server
If you are using either the NTP or SNTP protocols, you should obtain
copies of the appropriate RFCs and make sure that you comply with
them. If you are merely using the NTP packet format, and setting the
clock once per day you are not really using NTP or SNTP and there are no
standards, other than packet format.
Actually, I believe the server loading/bandwidth problem can be analyzed
statistically. Look up the "Erlang B" distribution. It's what the
telephone company uses to determine how many inter-office trunk lines it
needs and what call centers use to calculate how many operators they
need to have on duty.
I'm working strictly from a failing memory here, but ISTR that you feed
it any three of four variables and get the remaining variable as the
The Erlang B variables are:
1. Average call duration
2. Call arrival rate
3. Acceptable waiting time
4. Number of trunk lines (operators)
It will probably require some fudging by someone far better at math than
I am but I think it might give you a clue.
More information about the questions