-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
design proposalNeeds design doc/proposal before implementationNeeds design doc/proposal before implementationhelp wantedNeeds help!Needs help!
Description
libev has a few advantages over libevent:
- It scales better (see http://libev.schmorp.de/bench.html), which could come into play for handling very large numbers of connections (unlikely to make a difference for other situations).
- It supports better loop instrumentation and interception via check/prepare/idle watchers. This is actually my current motivation; I would like to instrument the loop duration and delay, generating histograms - libevent doesn't support this today based on my evaluation.
- We can avoid taking a pthread lock during the event loop.
Downsides include:
- We still need evbuffer support, so will need to link against both libev and libevent.
- We are perturbing a core part of the Envoy I/O model. This might have stability and performance implications (hopefully for the better..).
- We would need to more I/O outselves, e.g. replacing uses of
evconnlistener.
Open questions:
- Should we also evaluate and consider https://github.com/libuv/libuv?
- What about Windows support? Apparently IOCP doesn't work great in libev (or libevent), https://stackoverflow.com/questions/8042796/libev-on-windows says it is
selectbased.
CC @sesmith177 @tonya11en @mattklein123 @envoyproxy/maintainers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
design proposalNeeds design doc/proposal before implementationNeeds design doc/proposal before implementationhelp wantedNeeds help!Needs help!