{"repo":"ankur-anand/taskwheel","free":true,"listed":false,"github":"https://github.com/ankur-anand/taskwheel","clone":"git clone https://github.com/ankur-anand/taskwheel.git","description":"Hierarchical timing Wheel For Go, Manage Millions of timers with O(1), Operations.","language":"Go","stars":73,"topics":["distributed-systems","go","golang","scheduler","timing-wheel","timingwheel","ttl-cache"],"license":"MIT","category":"workflow-automation","readme_excerpt":"taskwheel A high-performance, generic Hierarchical Timing Wheel implementation in Go for efficient timer management at scale. Why TaskWheel? When you need to manage thousands or millions or timers (timeouts, TTLs, scheduled tasks) etc. While Go's standard time.Timer is excellent, it faces some challenges at high volumes. Example: How a Timing Wheel Efficiently Expires 10 Million TTL-Based Cache Keys Traditional cache cleanup scans every key ( O(n) ), which works fine at small scale — but completely breaks down once you hit millions of entries. Using a Timing Wheel , expiration becomes O(1) per tick — processing only the keys that are actually due right now. Read Stall Comparison (10 Million Keys) Metric Naive Scan Timing Wheel :- :- :- Avg Read Latency 4.68 ms 3.15 µs Max Read Stall 500 ms ≈ 2 ms At 10 million keys , a naive cleanup can stall reads for seconds — while the Timing Wheel glides through them in microseconds . Read the full story on Medium: Killing O(n): How Timing Wheels Expire 10 Million Keys Effortlessly in Golang Installation Quick Start High-Throughput Usage (10,000+ timers/sec) For production systems with high timer volumes, use StartBatch() with a worker pool: Performance Comparison Performance Comparison Workload Metric NativeTimers TimingWheel Difference ----------------------- ------------ -------------- ------------- ------------ 1K timers (100ms) Time/op 102 ms 110 ms +8% slower Mem/op 136 KB 214 KB +58% more Allocs/op 2.0 K 1.1 K -47% fewer 10K timers","default_branch":null,"files":null,"tree":[],"storefront":"/r/ankur-anand","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ankur-anand/taskwheel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}