By bob.santosjr
via timyang.net
Published: Nov 14 2009 / 21:44
Note: Chinese comments are many but the article is in English
Test a hello world web server in C, Erlang, Java and the Go programming language.
* C, use the well-known high performance web server nginx, with a hello world nginx module
* Erlang/OTP
* Java, using the MINA 2.0 framework.
* Go, http://golang.org/
Comments
RawThinkTank replied ago:
No OpenCL ?
:-0
AlainODea replied ago:
I should program an FPGA or ASIC to see how it compares :p
This benchmark is simplistic to the extent of bein pointless. You could easily get amazing performance out of a hard coded responder for this that has little/no knowledge of HTTP.
You might as well be testing raw TCP performance. What a waste of time.
bob.santosjr replied ago:
@AlainODea: So are you saying you can do a better test? Give me your link once you're done with one.
AlainODea replied ago:
@bob.santosjr: My complaint is that what that hello world isn't a reasonable web server test because it does not require the server to parse the HTTP request. It simply has to find the first \r\n\r\n in the input stream and then send static content and static headers back on the output stream. A comprehensive HTTP test suite comparing web servers would include conditional requests, malformed requests, slow requests and many other aspects. In short, it is extremely complex.
That said, the post presents an interesting baseline of CGI/Server-side generated content throughput.
Part of the problem in the hello world example is the use of uni-purpose CGIs or programs. This will not test anything that a developer can realistically build an web application on. As much as I love Erlang, the ehttp server used is a particularly problematic example of this because it is a hard-coded TCP responder. It would be more interesting to see how one of inet, Yaws, mochiweb, webmachine/mochiweb or crary would fare. It would be painfully hard to build a web application from ehttp as a base.
I should have been less harsh in my original response. Sorry for that :(
,
bob.santosjr replied ago:
@AlainODea: No worries, I was just looking for the basis of your complaint. And yes I agree with you that it is simplistic in nature and does not test how a web server would respond to complex requests but this one provides, as you have said, a baseline for generated content.
I would really love to see other tests like this with more details.
Voters For This Link (21)
Voters Against This Link (1)