Skip to content

libevent replacement with libev #4952

@htuch

Description

@htuch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    design proposalNeeds design doc/proposal before implementationhelp wantedNeeds help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions