4 ms·
While I personally like Jekyll, and the added simplicity when it comes to hosting, there should be almost no performance difference between a "dynamically" gene
by rb2k_ 14y ago
While I personally like Jekyll, and the added simplicity when it comes to hosting, there should be almost no performance difference between a "dynamically" generated blog based on Rails/Sinatra behind Cloudflare and static hosting on S3.
The only user generated content on a blog are usually comments. With just a bit of added caching headers, I'd say that 99+% of all page hits on a blog can be served out of Varnish.
You can even use rack-cache if you don't mind the performance penalty.
If you're ok with using e.g. Disqus (as Octopress does) for comments, you can serve 100% of them and just purge the cache when adding new content.
This would probably also work when doing a purge for new comments.
This way, you have to do the dynamic computation exactly once per page and you're done.
Adding the CDN properties of cloudfront to S3 is nice, but Cloudflare seems to provide a very similar solution for "regular" sites.
I'd say this is similar to comparing AOT compilation (Jekyll) vs JIT (dynamic generation + caching).
- danso 14y agoWy would you need to clear the cache with disqus? Isn't it a JS-served comment system?
- johnbellone 14y agoI converted my blog[1] to be static this past weekend using all AWS (S3+CF+Route53) and it went relatively painless. But I decided to use middleman instead, and after using that I don't think I'll be going back to Jekyll. I still have a Github.com pages account that uses Jekyll because its free, but since its so damn cheap I may convert this to AWS stack as well. The largest problem I was running into was permissions and invalidating the CF CDN. I am thinking of rolling a simple Markdown editor using node-webkit and scripting up some things to automate everything. [1]: http://thoughtlessbanter.com http://thoughtlessbanter.com
- HeyImAlex 14y agoI wrote a deployment script for s3/cf/r53 in python last week. It's pretty janky right now and is very oppinionated on a lot of things, but it handles invalidation requests for you and the code is simple enough to easily modify to your liking. http://www.github.com/heyimalex/s3tup http://www.github.com/heyimalex/s3tup
- polymathist 14y agoI'd be curious to do a comparison with a dynamic site behind a cdn. I suspect that from a performance standpoint it would be almost identical. I guess I chose Jekyll because it seemed more convenient and I was interested in trying something new. Also curious to see Cloudfare vs. Cloudfront (and maybe some other offerings in the mix as well).
- ksec 14y agoAnd that pretty much concludes the article? Serving Cached Dynamic Site with CDN and Static Site with CDN should have the same speed assuming CDN is the same. Which make this speedtest a little point less no?
- dakull 14y agoYeah I was thinking something similar also as bonus points using this is that you learn a ton while hacking for near-static-page performance and you get to have your CMS.
- StavrosK 14y agoThat's what I do for my blog, http://www.korokithakis.net/ http://www.korokithakis.net/. It's a small, custom blog system I wrote in half an hour, and caches everything, using Django's cache library. I just purge things whenever I add or edit a post. Generation is pretty fast, but the static media is a bit heavy for that theme...
- dakull 14y agowhy not push them to a CDN ? and you could extract the inline images from the css and combine all of them into a sprite
- StavrosK 14y agoYep, I just enabled CloudFlare on it, I'll see if this makes it any faster. It's hosted on AppEngine, so I'm guessing (/hoping) the static files are already pushed to a CDN by Google.
- Benferhat 14y agoI'm curious about what changes have you noticed when enabling CloudFlare, and whether you considered PageSpeed as well. Do tell?
- StavrosK 14y agoI haven't noticed many changes, it looks like the site loads a bit faster, but overall I haven't seen much. PageSpeed is different from CloudFlare, it just tells you how to make your page more lightweight. I had run PageSpeed before switching to CloudFlare.
- Benferhat 14y agoCool, please do drop an update if you come to any conclusions about its efficacy. BTW, I meant the PageSpeed Service for GAE [1], which seems like it's basically CloudFlare running mod_pagespeed on all requests. [1] https://developers.google.com/appengine/docs/adminconsole/performancesettings#pagespeed https://developers.google.com/appengine/docs/adminconsole/pe...