# Epoll's design limitations in multithreaded and load-balancing scenarios

DevFeed: [Epoll's design limitations in multithreaded and load-balancing scenarios](<https://devfeed.tech/articles/epoll-is-fundamentally-broken-1-2-38959.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12>)

Author: Marek

Published: 2017-02-19T23:00:00Z

Content type: opinion

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [IO](<https://devfeed.tech/topics/io.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>)

Tags: [epoll](<https://devfeed.tech/tags/epoll.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [threading](<https://devfeed.tech/tags/threading.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

## AI overview

This article examines design limitations in Linux epoll, focusing on event delivery when file descriptors are shared across worker threads and on epoll's association with underlying kernel objects rather than file descriptors. It recommends defensive programming and avoiding several sharing, forking, and load-balancing patterns.

## Source excerpt

Epoll is fundamentally broken 1/2 I/O multiplexing part #3 In previous articles we talked about: This time we'll focus on Linux's successor - the I/O multiplexing syscall. Epoll is relatively young. It was created by Davide Libenzi in 2002. For comparison: Windows did IOCP in 1994 and FreeBSD's kqueue was introduced in July 2000. Unfortunately, even though epoll is the youngest in the advanced IO multiplexing family, it's the worse in the bunch.