Written by Guillermo Garron .
Date: 2011-08-31 17:10:00 -0400
Today a post about 9 million hits per day with 120 MB RAM on Hacker News, called my attention.
As the guy who wrote that post, I’ve trying to make my blog be ready for a rush of visits.
As him, I’ve been hit in the past from Digg (Twice) and from Slashdot once, that was when I was beginning and I had Drupal (no optimization) running in a shared hosting server.
The server took my page out, because I was making too many requests to the MySQL database. Sure I was, I had Drupal modules showing recent comments, showing most visited posts, in fact showing too much real-time information.
From those days I’ve been trying to improve the performance of my server, the last effort I made was this configuration:
Client -> Varnish -> Nginx (serving static pages created by boost) -> Apache -> Drupal+boost
Actually, Varnish is not needed or Nginx is not needed here my analysis
Well, later I decided as some of the comments here suggests, that a blog is actually static content, and as thus there is no need of PHP or any other dynamic page creation.
I’ve moved to Jekyll + Nginx.
Guess what. Using the same testing tool, I’ve got 18+ millions possible hits per day I’m sure the server can do more, and with 128 MBytes of RAM.
Here are some info about my server:
Nginx running on Linux, powered by Linode with RAM limited to 128 Mega Bytes.
What I’ve done was to run the same tool, from two different computers/account at the same time, agains the same site:
Here some pictures that show the test results:
Response times 1
Response times 2
Hit rate 1
Hit rate 2
As you can see, there are some few errors from the second test running, so it seems we are achieving the top of the server capacity.
Here is a screenshot of TOP command running during the tests:
Off course running a dynamic blog have some advantages, as for example Infinite scroll, but on the other hand, running a static blog, has other advantages, and maybe security may be the most important.permalink
If you enjoyed the article, please share it