There have been multiple occasions where I am trying to read an article and the website is down. I have encountered this multiple times where people say something like: “I got around 13,000 hits and server couldn’t handle it”. There are even websites that become popular by making the content of the popular article available. One of these cases is DuggMirror, a service that mirrors Digg articles and makes them available in case the source is unavailable. If you are running a blog and you have your own server, here are a few tips to easily handle at least half a million hits per day.
1. Install Linux in your server. Linux runs pretty good and there are a lot of tools to support the server administration.
2. You will need a web server. A lot of users install Apache but I strongly suggest to use Lighttpd. Your blog will usually have images, CSS files, and Javascript files. Apache usually in general doesn’t handle static files as well as Lighttpd. Lighttpd is an event-driven web server that minimizes the blocking waiting for IO.
3. Your blog will need PHP and MySQL. Make sure you have those running.
4. Install eAccelerator - By default, every time a PHP script is accessed, the web server must compile the script then execute the compiled code. This task is not needed if the PHP script doesn’t change. What a eAccelerator does is it optimizes the scripts, compiles them, then caches them in a compiled state.
5. Install WordPress - This blogging software a lot or all of the features you need. It also scales well when having a lot of traffic.
6. Install the WP-Cache plugin - Your requests will live in a database and every time you get a new visitor, WordPress will have to retrieve this content from the database. If you get 30,000 visitors, your blogging software will have to do the same query that many times. WP-Cache prevents by caching to disk whatever is in your database so that it can eliminate the need to query the database that many times.
7. Create a memory file system - WP-Cache caches its files on disk. We know that memory access is much faster than disk access. Creating a memory file system (tmpfs) and putting WP-Cache files in it, will tremendously increase the speed of retrieving cache files.
* If you installed WordPress on something like /var/www/myblog and wanted to have a memory file system of 100MB you can execute the following command to mount a tmpfs file system where the cache directory resides:
mount -osize=100m -t tmpfs tmpfs /var/www/myblog/wp-content/cache
* You can also do this from /etc/fstab with the following line:
tmpfs /var/www/myblog/wp-content/cache tmpfs defaults,size=100m 0 0
We currently host this blog and ThemBid.com on the same server with this setup and sometimes gets around half a million hits per day without a problem.
Original Source:http://blog.thembid.com/2007/07/17/how-to-handle-thousands-of-users-with-your-blog/
Related Stuff
Google Buzz Button Wordpress Plugin ReleasedIf you are looking for a Google Buzz button to add into your Wordpress site then we have released the first Wordpress plugin exclusively ...
Plug And Play Ecommerce With Wordpress PluginsSince 2003 Wordpress has slowly been gaining popularity amongst the elite of the internet, the bloggers. It is one of those few things ...
Add Google Search to Your WordPress BlogThe native WordPress search does not return very relevant results, thus it makes a lot of sense to add Google Search into your WordPress ...
Add More Sidebars to Your WordPress ThemeYou can add more than one sidebar section to your WordPress site. For example, with the stc-intermountain.org site, I added a whole bunch ...
Series Posting in WordpressIn my functions.php file, I have some code which implements series posting. This relies on the thematic ...
