Link Details

Link 288941 thumbnail
User 504531 avatar

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/
  • 21
  • 1
  • 2910
  • 1320

Comments

Add your comment
User 393686 avatar

RawThinkTank replied ago:

-1 votes Vote down Vote up Reply

No OpenCL ?

:-0

User 237027 avatar

AlainODea replied ago:

0 votes Vote down Vote up Reply

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.

User 504531 avatar

bob.santosjr replied ago:

0 votes Vote down Vote up Reply

@AlainODea: So are you saying you can do a better test? Give me your link once you're done with one.

User 237027 avatar

AlainODea replied ago:

0 votes Vote down Vote up Reply

@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 :(
,

User 504531 avatar

bob.santosjr replied ago:

0 votes Vote down Vote up Reply

@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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.