Live data from Hacker News

Is Your Site Hacker News Ready?

brandonsavage.net

31–40 of 51 posts

Re: Is Your Site Hacker News Ready?

#31
post #21

If you're hosting some sort of blog post, the best way to ensure that all goes well with high traffic is to make it static. Something like jekyll works great for this (publishing especially), and you can host any static site with a node server in like 3 lines of code on nodejitsu for $3/month. Nodejitsu can handle hacker news traffic without even the slightest blink, with one dyno - I had a post up on the homepage fo…

Really, I don't know why dynamic languages became so popular for blog platforms.

It's an overkill all you need is static content.

Re: Is Your Site Hacker News Ready?

#32
post #4

I'm constantly amazed at how poorly Wordpress is able to perform. 2.5GB virtual server with a cache in front of it and it went down? My blog is a Django app running on a 512MB Rackspace VM with a basic Apache, mod_wsgi, and Postgres setup. I have a dozen low traffic applications all running on the same server alongside it. I have zero caching set up so every hit is doing the full process of querying the database and…

He didn't have a cache in front of it - he had W3 total cache installed, but not enabled for object caching.

If he'd had W3 total cache, or varnish (my preferred option) in front of it, he wouldn't of noticed the impact.

There's a bigger question of why Wordpress still doesn't ship with sensible caching enabled by default, backwards compatibility with some plugins just doesn't cut it for me.

Re: Is Your Site Hacker News Ready?

#33
post #5

Good tips for Wordpress users. Another great option we went for is hosting your entire site/blog on S3/cloudfront. This can be done using tools like Jekyll ( https://github.com/mojombo/jekyll ) or Middleman ( http://middlemanapp.com/ ).

If your site is entirely static content and mostly text, you don't really need a CDN. I've had a static site survive the HN frontpage without any problem on cheap-ass shared hosting.

Correct. But availability of cheap-ass shared hosting will be nowhere near that of S3+Cloudfront.

Additionaly, S3 and Cloudfront are extremely cheap themselves. And you get a few nice bonusses (like low latency, everywhere).

Re: Is Your Site Hacker News Ready?

#34
post #11

I am preparing a new blog, that I do have the intention to have it featured on HN sometimes. For now what I will do is use a very lightweight Wordpress theme, and cloudflare. Is that enough?

If you just want to walk through a basic setup which will cope easily with HN and other front pages, just follow this post (disclosure, it's my blog!):

http://www.ewanleith.com/blog/900/10-million-hits-a-day-with...

It works, has been on HN front page a couple of times, and other similar sites, sometimes getting > 50k hits per day without an issue.

Re: Is Your Site Hacker News Ready?

#35
First time I reached the front page I had ~250 concurrent users and increasing, then the server crashed.

After that I wrote a cronjob that runs a script which automatically increases my virtual machines RAM. When I have little or no visits it uses 1GB RAM the most it went up to was 9GB RAM (increasing with 1GB at a time).

It also sends me an e-mail when increasing/decreasing the RAM so I can ensure that it doesn't crash.

I also use Wordpress with caching enabled and the above helps me keep the costs down, don't want the server to run on 8GB RAM all the time nor 1GB RAM.

Re: Is Your Site Hacker News Ready?

#36
post #21

If you're hosting some sort of blog post, the best way to ensure that all goes well with high traffic is to make it static. Something like jekyll works great for this (publishing especially), and you can host any static site with a node server in like 3 lines of code on nodejitsu for $3/month. Nodejitsu can handle hacker news traffic without even the slightest blink, with one dyno - I had a post up on the homepage fo…

Really, I don't know why dynamic languages became so popular for blog platforms. It's an overkill all you need is static content.

Non-programmers find it much easier to log into a site, type in a text box, and click 'submit' than to run some sort of static site generator.

Re: Is Your Site Hacker News Ready?

#37
post #26

NginX + php-fpm + APC did the trick for me, at one time even in an EC2 Micro instance under heavy load. There is a very nice hack I applied to my WordPress installs, but it's not for the faint hearted: hack the WP index.php to serve pages directly from Memcache for all non-authenticated GET requests. The beauty of this is that for most requests, the WP environment (which is horribly bloated) does not even get loaded.…

You could just pop Varnish cache in front of Wordpress to do the same thing - any unauthenticated GET's will just hit Varnish, and come nowhere near Wordpress itself.

That way you wouldn't need to worry about software updates.

Re: Is Your Site Hacker News Ready?

#38

Earlier quoted context omitted.

Really, I don't know why dynamic languages became so popular for blog platforms. It's an overkill all you need is static content.

Non-programmers find it much easier to log into a site, type in a text box, and click 'submit' than to run some sort of static site generator.

If you're at the stage where you're maintaining your own server anyway, it doesn't seem like too much to ask.

Static websites are glorious. Much more secure, much faster to load, far fewer things that can go wrong. Cheaper, too, since they require fewer resources. And, as luck would have it, there's a perfect Hacker News thread to get one started:

http://news.ycombinator.com/item?id=4857473

Re: Is Your Site Hacker News Ready?

#39
post #37
post #26

NginX + php-fpm + APC did the trick for me, at one time even in an EC2 Micro instance under heavy load. There is a very nice hack I applied to my WordPress installs, but it's not for the faint hearted: hack the WP index.php to serve pages directly from Memcache for all non-authenticated GET requests. The beauty of this is that for most requests, the WP environment (which is horribly bloated) does not even get loaded.…

You could just pop Varnish cache in front of Wordpress to do the same thing - any unauthenticated GET's will just hit Varnish, and come nowhere near Wordpress itself. That way you wouldn't need to worry about software updates.

Totally. I guess I could also use some advanced Nginx directive/plugin to do that. The hack is just something that occurred to me spontaneously, it took about 2 minutes to implement, and I didn't even have to install anything :)

Re: Is Your Site Hacker News Ready?

#40
Tip: if you have an image-heavy blog, don't host the images somewhere that charges extra for exceeding a network traffic limit. Getting an overage charge email was how I discovered that my fractal article full of pictures was on HN.

As an aside, I found that being on Reddit can give much, much more traffic than HN.

Post reply on HN