Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 328145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:28:04+00:00 2026-05-12T09:28:04+00:00

The Wikipedia entry doesn’t give details and the RFC is way too dense. Does

  • 0

The Wikipedia entry doesn’t give details and the RFC is way too dense. Does anyone around here know, in a very general way, how NTP works?

I’m looking for an overview that explains how Marzullo’s algorithm (or a modification of it) is employed to translate a timestamp on a server into a timestamp on a client. Specifically what mechanism is used to produce accuracy which is, on average, within 10ms when that communication takes place over a network with highly variable latency which is frequently several times that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:28:04+00:00Added an answer on May 12, 2026 at 9:28 am

    (This isn’t Marzullo’s algorithm. That’s only used by the high-stratum servers to get really accurate time using several sources. This is how an ordinary client gets the time, using only one server)

    First of all, NTP timestamps are stored as seconds since January 1, 1900. 32 bits for the number of seconds, and 32 bits for the fractions of a second.

    The synchronization is tricky. The client stores the timestamp (say A) (all these values are in seconds) when it sends the request. The server sends a reply consisting of the “true” time when it received the packet (call that X) and the “true” time it will transmit the packet (Y). The client will receive that packet and log the time when it received it (B).

    NTP assumes that the time spent on the network is the same for sending and receiving. Over enough intervals over sane networks, it should average out to be so. We know that the total transit time from sending the request to receiving the response was B-A seconds. We want to remove the time that the server spent processing the request (Y-X), leaving only the network traversal time, so that’s B-A-(Y-X). Since we’re assuming the network traversal time is symmetric, the amount of time it took the response to get from the server to the client is [B-A-(Y-X)]/2. So we know that the server sent its response at time Y, and it took us [B-A-(Y-X)]/2 seconds for that response to get to us.

    So the true time when we received the response is Y+[B-A-(Y-X)]/2 seconds. And that’s how NTP works.

    Example (in whole seconds to make the math easy):

    • Client sends request at “wrong” time 100. A=100.
    • Server receives request at “true” time 150. X=150.
    • The server is slow, so it doesn’t send out the response until “true” time 160. Y=160.
    • The client receives the request at “wrong” time 120. B=120.
    • Client determines the time spend on the network is B-A-(Y-X)=120-100-(160-150)=10 seconds
    • Client assumes the amount of time it took for the response to get from the server to the client is 10/2=5 seconds.
    • Client adds that time to the “true” time when the server sent the response to estimate that it received the response at “true” time 165 seconds.
    • Client now knows that it needs to add 45 seconds to its clock.

    In a proper implementation, the client runs as a daemon, all the time. Over a long period of time with many samples, NTP can actually determine if the computer’s clock is slow or fast, and automatically adjust it accordingly, allowing it to keep reasonably good time even if it is later disconnected from the network. Together with averaging the responses from the server, and application of more complicated thinking, you can get incredibly accurate times.

    There’s more, of course, to a proper implementation than that, but that’s the gist of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know a library or some at least some research on creating and
In the wikipedia entry Unobtrusive JavaScript there is an example of obtrusive JavaScript: <input
On this Wikipedia entry I found out that ITU Telecommunication Standardization Sector (ITU-T) is
According to this Wikipedia entry on the PNG format , a PNG image file
The Wikipedia article about special member functions doesn't contain any reference to move constructors
I was reading the C# entry on Wikipedia, and came across: Managed memory cannot
ext3 has 3 journaling options: journal, ordered, and writeback. According to the wikipedia entry
According to this Wikipedia entry: Protocol Buffers is very similar to Facebook’s Thrift protocol,
Here's my code.. require open-uri base_url = http://en.wikipedia.org/wiki (1..5).each do |x| # sets up
From the Wikipedia entry on recursive definition : An inductive definition of a set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.