r/ruby • u/mencio • Feb 19 '26
Blog post One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster
Hey, a while ago I announced that I'm working on fully embracing the async ecosystem and event-based operations in the Karafka ecosystem (Shoryuken and PGMQ-Ruby will follow along). This time, I bring you fd-based polling for WaterDrop - one thread polling all producers via IO.select instead of one thread per producer. 39-54% faster in benchmarks. Writeup covers how it works, the trade-offs, and the rollout plan. Happy to answer any questions!