8 Timer Implementation Patterns for Systems and Network Software

Times in the System If you've ever worked on network protocol stacks, kernel/driver code, or any system-level application, you've run into the same deceptively simple problem: how do I make something happen after a certain amount of time has passed — reliably, and at scale? It sounds trivial until you're managing thousands of concurrent timers — per-neighbor BGP hold timers, per-tunnel keepalives, retransmission timeouts — and your naive implementation starts burning CPU cycles just walking a list. Over the years, systems engineers have converged on a handful of proven patterns for this. Here's a rundown of the most common approaches, from the hardware level up to modern event-driven
…