Hacker News new | ask | show | jobs
by axylone 5577 days ago
Woo - nice to see this on HN (I'm one of the creators).

EDIT: We're serving this off ec2 + apache. It's all static html + js. Any quick tips for speeding things up?

5 comments

Unless you have a very specific need, consider switching to a web server more explicitly designed for static content. Nginx takes minutes to install and configure.
If it's static, serve it directly from S3, and turn on cloudfront for even better delivery.
ok, I think we managed to switch http://www.kathack.com over to S3. Thanks for the tip!
No problem. Love the script.
from my understanding, S3 optimizes throughput but not latency. I'm not surprised that his performance serving from S3 is perfectly fine, but I think the "answer" is to skip straight to CloudFront. CloudFront can mirror directly from your appserver, or from S3, it doesn't matter.

update: did a little googling, and found only anecdotal evidence that latency to S3 is fine but not awesome:

http://www.cloudclimate.com/s3/

http://www.codeswimming.com/blog/2010/04/amazon-s3-and-cloud...

http://www.slideshare.net/ehwinter/using-amazon-cloud-front-...

I hope you don't mind, but I just mirrored it on Github (https://github.com/seancron/kathack). You can use the following javascript to load it from the mirror.

    javascript:var i,s,ss=['https://github.com/seancron/kathack/raw/master/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);
P.S. If you do mind, just let me know and I'll take it down.
Ok, we switched everything over to S3. Everything should be much faster now.

Looks like we have a ~275MB access.log from before the switch. Over a million requests!

   $ wc -l access.log
   1115447 access.log
To quote the King of all Cosmos: "We are moved to tears by the size of this thing."

Really well done, I love it. The only shame was that the music didn't work on Safari, but maybe it's just how I roll.

This will work in Opera too if you add -o- to the POSSIBLE_TRANSFORM_PREFIXES array.