But the nginx http parser is one of the things that is fast, so a faster one is interesting.
I think having a library implementation is very useful as well.
But the nginx http parser is one of the things that is fast, so a faster one is interesting.
I think having a library implementation is very useful as well.
Regarding the performance of the HTTP parser, I have heard that picohttpparser (the HTTP/1 parser used by H2O) is much faster than the HTTP parser used by nginx. https://github.com/kazuho/picohttpparser
If that is true, it is likely due to the difference between the approaches the parsers take. Unlike most parsers, picohttpparser does not have a callback-based API. Instead it uses a loop for parsing the HTTP request and header lines.
note: This comment might be biased since I am the author of H2O and picohttpparser.
picohttpparser is the core of HTTP::Parser::XS which is used by many HTTP application servers for Perl (see http://plackperl.org). There are many deployments using it.