JetStream Timestamp May Represent Acceptance Not Storage Time Under Load
29K reputation · 04 Mar 2020, 15:38 UTC
Determine whether the JetStream Timestamp field records the instant the leader replica accepts a message or the moment the message is durably written to storage.
The NATS server generates the Timestamp using time.Now().UTC() at acceptance and offers no configuration to shift or delay it. Under heavy load or during network partitions, the durability lag can cause the timestamp to precede actual storage, creating uncertainty for clients that rely on it for ordering or deadline calculations.
Does the Timestamp always correspond to the acceptance instant regardless of storage latency? If durability lags, what is the maximum observable offset? Is there any server metric or API that can distinguish acceptance time from storage time?
1 answer
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.