3 ms·
HTTP protocol grammar is pretty simple, but parsing correctly considering the server side and desired performance may be hard. By nature parsing strings is exp
by edsiper2 12y ago
HTTP protocol grammar is pretty simple, but parsing correctly considering the server side and desired performance may be hard.
By nature parsing strings is expensive (not sure why they designed HTTP in string format, binary would save a ton of power in processing). So imaging you are receiving a request, most of the time due to Network latency (client or server side), you don't get the full Request at once, most of the time you need to perform a couple of read(2) operations.
Now, what do you do on each read ?, did you manage full state ?, how many parsing rounds ?, how to catch the end of the protocol block , etc etc etc.
So answering your questions I would say "YES", the HTTP protocol in a Server "may be" a bottleneck if its not well implemented. In our HTTP Server project[0] we are working in a new parser to improve performance, so for real, this is a very important topic.
[0] http://monkey-project.com http://monkey-project.com
best