Awesome, I wasn't aware of evhttp-sharp. On first glance it seems not to provide any Owin middleware compatibility, but it should be easy to do a small server factory that plays with Microsoft.Owin.Hosting and get that out of the box.
I've also found https://github.com/Bobris/Nowin a while ago - very fast on Windows, but I can't get it to work on Mono 3.4 on linux, locks on the first request.
If you do make it OWIN compatible or a FastCGI wrapper for libevent that would be awesome. Right now, you need to basically have nginx proxy all the requests to evhttp which probably adds a little bit of overhead over doing it through FastCGI directly.
Edit: Actually from what I've seen, Mono uses epoll/kqueue for async IO which is what libevent uses as well. I think the problem might not be so much that libevent is faster than what Mono can do in plain C# but rather that the FastCGI implementation has some bottlenecks or is not using the most performant APIs available. I haven't had time to profile it though.
Comments
Awesome, I wasn't aware of evhttp-sharp. On first glance it seems not to provide any Owin middleware compatibility, but it should be easy to do a small server factory that plays with Microsoft.Owin.Hosting and get that out of the box. I've also found https://github.com/Bobris/Nowin a while ago - very fast on Windows, but I can't get it to work on Mono 3.4 on linux, locks on the first request.
If you do make it OWIN compatible or a FastCGI wrapper for libevent that would be awesome. Right now, you need to basically have nginx proxy all the requests to evhttp which probably adds a little bit of overhead over doing it through FastCGI directly.
Edit: Actually from what I've seen, Mono uses epoll/kqueue for async IO which is what libevent uses as well. I think the problem might not be so much that libevent is faster than what Mono can do in plain C# but rather that the FastCGI implementation has some bottlenecks or is not using the most performant APIs available. I haven't had time to profile it though.