Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, and Go doesn't expose a monotonic clocksource in its stdlib[1]. I'd bet that's what this boils down to.

[1] https://github.com/golang/go/issues/12914



Wow, that discussion is cringeworthy

I really thought anyone discussing systems programming should be aware of the need for a monotonically increasing clock source

REALLY


I'm confused on why a DNS server would need to rely on a monotonic clock for its use cases. Is there a part of DNS that relies on the assumption of synchronized, monotonic time? (Perhaps TTL/expiry of records? But I still don't see why having a non monotonic clock source would harm if CF is using Go timers for expiry)


One example might be rate limiting. Count requests over elapsed time. If elapsed time is a negative number, the math might trigger a bug that causes CF to block requests...too many requests over time period X.


Cloudflare posted a post-mortem [1]. They were measuring round trip time, and supplying the result of that into the golang rand.Int63n() function, which panics the process when given a negative number.

[1] https://blog.cloudflare.com/how-and-why-the-leap-second-affe...


That's really odd. You can't even make a working progress display without that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: