4 ms·
Show HN: Don't get slashdotted when your link hits the HN front page
I'm sick and tired of clicking interesting links on the HN front page, only to get a spinning loader and waiting 10+ seconds for nothing. I'm not going to take the time to find the Google cache for your site, so if you want me to read what you wrote, please consider doing at least the bare minimum to keep your site running when I visit:
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!
- frankacter 13y agoI'd add on to this to consider using CloudFlare and setting up page rules to cache static HTML so the majority of your anonymous reader traffic is served from their servers and not yours.
- geerlingguy 13y agoAnother very good, and free, option!
- Sealy 13y agoI second that frankacter. I use CloudFlare and even at its lowest option is a godsend. For those that are unaware it is a CDN with a number of great benefits: 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
- chidevguy 13y agoGreat suggestions! I'd also add Octopress (http://octopress.org/ http://octopress.org/), which is built on Jekyll and works well with Amazon CloudFront (haven't tried CloudFlare, but I'd imagine that works just as well).