3 ms·
Ask HN: how do you prepare for a traffic spike (i.e. from HN)?
You see this all the time. Blogs or websites go down when they reach the main page of Hacker News.
My question is, what do you do to prepare if you are expecting such traffic hikes? I use hostgator for example and have never had massive amounts of traffic to any of my sites as of yet, but wonder how it would hold up under intense loads that HN or reddit might bring.
- staunch 14y agoThis is almost purely a matter of what software you're running. Just about any server can handle HN traffic if it's serving static content using a event-based server like nginx. Oh the other end, if you have a dynamic web site that's doing heavy DB queries on every request, even a relatively small rate of requests can bring you down. A basic scaling strategy is pretty straight forward. 1) Any content that can be static should be, and most content can be static. For example you can make Wordpress serve posts as static files using plugins. 2) Any dynamic content should rely heavily on caching (DB queries in memcached and HTML content in Varnish, for example).
- wallawe 14y agoThanks staunch, good info. Where I can read/learn more about these strategies? It's not something I have delved into in any manner and would like to learn at least a little more about some of these methods.
- staunch 14y agoI'd recommend just using the Google. Search for "(Rails|PHP|Wordpress|MySQL|HTTP|Varnish) caching". Lots of great tutorials and articles come up.
- factorialboy 14y agoI was on the front page last week. Needless to say my self hosted Wordpress crashed (Nginx, PHP, Wordpress, MySQL). Here's what I did: http://www.srirangan.net/2012-10-leaving-php-mysql-wordpress-behind http://www.srirangan.net/2012-10-leaving-php-mysql-wordpress...
- robbiea 14y agowpengine.com It's a lifesaver for me.