Pinboard (jm)
https://pinboard.in/u:jm/public/
recent bookmarks from jmRatas - A hierarchical timer wheel2016-08-05T20:25:11+00:00
https://www.snellman.net/blog/archive/2016-07-27-ratas-hierarchical-timer-wheel/
jmtimer-wheels timing-wheels algorithms c linux timers data-structureshttps://pinboard.in/https://pinboard.in/u:jm/b:23d21f124b64/Apache Kafka, Purgatory, and Hierarchical Timing Wheels2015-10-29T16:37:01+00:00
http://www.confluent.io/blog/apache-kafka-purgatory-hierarchical-timing-wheels
jmIn the new design, we use Hierarchical Timing Wheels for the timeout timer and DelayQueue of timer buckets to advance the clock on demand. Completed requests are removed from the timer queue immediately with O(1) cost. The buckets remain in the delay queue, however, the number of buckets is bounded. And, in a healthy system, most of the requests are satisfied before timeout, and many of the buckets become empty before pulled out of the delay queue. Thus, the timer should rarely have the buckets of the lower interval. The advantage of this design is that the number of requests in the timer queue is the number of pending requests exactly at any time. This allows us to estimate the number of requests need to be purged. We can avoid unnecessary purge operation of the watcher lists. As the result we achieve a higher scalability in terms of request rate with much better CPU usage.
]]>algorithms timers kafka scheduling timing-wheels delayqueue queueinghttps://pinboard.in/https://pinboard.in/u:jm/b:60858eeba501/