Skip to content

Dedicated Timestamp Service

What if a single dedicated service hands out timestamps — so all servers use the same clock?

If multi-server clock drift is the problem, the logical fix is to have one authoritative time source. All servers ask it for the current time instead of reading their own clocks.


The idea

Instead of each server reading its own clock, every server that needs to stamp a message calls a central timestamp service:

Server A receives Alice's message
  → calls TimeService → gets T=1000ms
  → stamps message with T=1000ms

Server B receives Bob's message (1ms later)
  → calls TimeService → gets T=1001ms
  → stamps message with T=1001ms

One source of truth. No clock divergence between Server A and Server B. Ordering should be consistent.


Why it still doesn't work

The problem is network latency between the server and the timestamp service.

Server A calls TimeService → network hop takes 0.5ms → gets T=1000ms
Server B calls TimeService → network hop takes 2ms   → gets T=998ms

Server A got a timestamp of 1000ms. Server B, which called the service 0.5ms later in real time, got a timestamp of 998ms because its network round-trip was longer. Server B's message appears to have arrived earlier than Server A's even though it didn't.

The timestamp service removes clock drift between servers, but introduces a new source of error: network hop latency variability. You can't stamp a message with the time you got from the service — by the time the response arrives, real time has moved on, and the amount it moved depends on an unpredictable network round-trip.


The fundamental problem

Every timestamp-based approach eventually hits the same wall: time is a physical measurement, and physical measurements have uncertainty. Whether the uncertainty comes from drifting clocks or variable network latency, the result is the same — close-in-time events from different sources can get their order flipped.

The right solution is to abandon timestamps for ordering entirely and use something that is not a measurement of physical time — a logical sequence number.

Key takeaway

A dedicated timestamp service removes clock drift but introduces network latency as the new error source. You are trading one form of uncertainty for another. The only escape is to stop using time for ordering.