Based on the documentation, duration_ms is the same as duration but in ms. However, I’m seeing differences in the values, for example (these are each on the same request):
Please show your config. Where are you getting these values from?
The difference is sub-millisecond, it’s probably just the amount of time it took between each getting computed. They’re computed separately, from the moment in time they’re invoked.
start := time.Now()
defer func() {
// total proxying duration, including time spent on LB and retries
repl.Set("http.reverse_proxy.duration", time.Since(start))
repl.Set("http.reverse_proxy.duration_ms", time.Since(start).Seconds()*1e3) // multiply seconds to preserve decimal (see #4666)
}()
The times are calculated on separate lines of code so there would be a tiny difference in their values. Sure we could hoist time.Since(start) to be calculated once but it doesn’t really matter.