Webserver Scalability and Reliability

Posted on by

Everybody knows Apache and Tomcat but when I try to talk about such strange things like Yaws or Mochiweb nobody knows what I actually want. These two are HTTP server implementations written in the old fashioned functional language Erlang and running on the famous Open Telecom Platform or OTP. Erlang/OTP was developed in the late 80s as a fault tolerant and highly scalable system for telecom applications. Nowadays in the social networking community it is daily business to serve some 10.000s of PHP requests per second. So we are facing problems telcos have for a long time.

Apache is the canonical web server to serve PHP to the world. Thinking about technological alternatives in the backend domain we have a look at both Java and Erlang. A rather quick and easy test to compare the scalability of the technologies was to setup web servers delivering the same static document. The image below shows the results.

Web Server Scaling by Concurrency

Apache and Tomcat scale nearly linearly up to a concurrency of 1000. We find that Mochiweb has a breakdown when concurrency reaches 300 but afterwards still scales linearly as Yaws does at a lower level. Absolute performance is less interesting here. What counts is the scaling behavior. Mochiweb for example is not designed first hand to deliver static content but to act as a HTTP endpoint for arbitrary OTP applications. Neither Yaws nor Mochiweb seem to cache documents in the default setup. Also, we did not use HiPE.

Unfortunally we had not yet the chance to verify the measurements given in this post: http://www.sics.se/~joe/apachevsyaws.html where Yaws still scales linearly (in the average) when Apache has long gone away, at concurrency of 50.000 or even 80.000 and clearly seems to survive DDoS attacks.

In this picture Erlang/OTP may not be a recommendation for classical web delivery but to build reliable services either to provide internal or external API endpoints. An interesing alternative at least.

8 thoughts on “Webserver Scalability and Reliability

  1. Pingback: buildblog | Studivz bekommt Entwicklerblog und iPhoneApp

  2. G-WAN C scripts generate dynamic contents in the hundreds of thousands times per second… even faster than Nginx serving a small static file:


    Besides, G-WAN uses 4-5x less memory and CPU than Nginx to serve 4x more requests per second.

  3. excellent put up, very informative. I wondewr why the opposite specialists
    of this sector do not nderstand this. You should cobtinue your writing.
    I am sure, you’ve a huge readers’ base already!

  4. It’s great hat you are getting ideas from this article as
    well as from our discussion made at this place.

  5. Every weekend i used to pay a quick visit this web page, because i
    wish for enjoyment, since this this web site conations in fact fastidious
    funny material too.

  6. A fascinating discussion is wort comment. I think that you ought to write more on this subject matter, it might not be a taboo matter bbut usuall folks don’t talk about such issues.
    To the next! All the best!!

  7. Verry good post! We are linking to this particularly great
    post on our site. Keep up the grewt writing.

Leave a Reply

Your email address will not be published. Required fields are marked *