12 points · by geerlingguy · 13y ago · 4 comments
1. Use a static page cache / serve static HTML. Either use something like Varnish, or if you don't want to configure it or you're on a shared host, use one of the following extensions/techniques to statically cache pages:
- Wordpress: http://wordpress.org/plugins/wp-super-cache/
- Drupal: https://drupal.org/project/boost
- Joomla: http://extensions.joomla.org/extensions/core-enhancements/performance/cache/13155
- Rails: http://guides.rubyonrails.org/caching_with_rails.html
Even better, use something like Jekyll (http://jekyllrb.com/) for static pages by default. There are many good static site generators that will let your site stay nimble even with hundreds of requests/second on a shared host!2. For Apache, set KeepAliveTimeout to something sane, like < 5 seconds. You don't all your active connections clogged up while 50+ people are simultaneously visiting.
3. Don't add a bunch of huge images—unless they're hosted on a CDN/other domain, and/or you have the server bandwidth and resources to serve such images.
It's great that you want to control your own content on your own domain/host, but please try to keep up with the moderate levels of traffic the front page of HN throws at your server!
1. It cuts your server bandwidth usage in half or better for flat content
2. It accelerates content delivery around the world
3. Provides protection
Disclosure: I am a VERY happy customer of their services