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:
CC @sesmith177 @tonya11en @mattklein123 @envoyproxy/maintainers
libev has a few advantages over libevent:
Downsides include:
evconnlistener.Open questions:
selectbased.CC @sesmith177 @tonya11en @mattklein123 @envoyproxy/maintainers