Bulletproof your blog – survive the Hacker News effect
maxmasnick.com
maxmasnick.com
If your goal is learning a new language or framework, this is a great idea. If your goal is to have a reliable, traffic-resistant blog I think it's best to stick with a tried and true platform.
However, I think most people would probably be trying to learn a framework like Rails or Django if they were writing a blogging engine to learn a new language/framework.
More things to learn. Yay!
NearlyFreeSpeech.NET is really good at handling traffic spikes, for both static and dynamic sites. It combines the convenience of shared hosting with the scalability of cloud computing. You just need to insert more coins when you run out of your prepaid traffic.
I think it cost me about 10 cents. Brilliant.
The other services are just hosting many websites on a server.
Not necessarily. I have a very simple static site generator (basically a single Python script, plus a few dependencies) running on a EC2 Micro instance. It watches changes in a shared Dropbox folder (using inotify and dropboxd) of a bunch of Markdown files and templates, and generates HTML posts, index page, and RSS automatically. I could post from any machine as long as it has my Dropbox account, even on my iPhone! No more command lines or git stuff, just write. Dropbox will take care of the rest.
Joe Hewitt's Nerve [1] works this way. I believe Marco Arment's Second Crack works similarly, too, but it's not open sourced yet.
I am pretty busy this days but if someone wants to create and opensource project that hundreds of people would love, that would surely be one.
This isn't Calepin's fault, though. It's because Dropbox doesn't support event notification yet. The offical Dropbox API cannot inform a 3rd-party app that something changes in a user's Dropbox folder. So the app has to poll, which isn't allowed on a large scale, or ask the user to manually notify the app about updates, which is painful. See this thread on Dropbox forum for details http://forums.dropbox.com/topic.php?id=20226&replies=45
Joe's, Marco's, and mine solutions basically avoid the last part and let me just write.
Instead, I just made a Rails app with fifteen minutes spent dropping in Active Admin and RDiscount to render @post.body Markdown into @post.rendered_body HTML. Then, I aggressively cached pages into the static `public/` directory. I chose Rails simply because I'm using Rails for more serious apps and I wanted a casual app that I could take seriously enough to practice on.
Otherwise, I'd have as much fun building the same thing in any other Ruby framework for Ruby practice and then cache the pages into a static directory.
Isn't that what any other static site generator does?
ExpressionEngine understood the need for people with a lot of needs, but I think everyone eventually have to roll their own (using some sort of framework), if they want something that satisfies their perfectionism.
30,000 hits in 24 hours.
I remember the "move your site off of GoDaddy" post last week going down this week which was run on Tumblr. Elsewhere Tumblr wasn't down so it depends on the resources they allocate to you. I suspect MG Seigler's blog is on a top tier Tumblr resource pool so I wouldnt recommend Tumblr unless you have constant popularity to your blog.
http://octopress.org/ My blog using the default theme: http://www.trevoroakes.com
In my experience, MediaTemple handles traffic spikes remarkably well. Maybe not ideal for the super-techies, but running WordPress on it with a caching plugin handles traffic pretty well at the $20 / month plan. And using S3 to serve static sites is fantastic. I'm on my phone right now so it's a pain to find the specific article, but Kyle Shank uses S3 and wrote a pretty handy article at http://kyleshank.com. Check it out and try to find the article. Great read.
Upload to server as html.
Add.htaccess rule to redirect old dynamic page to static page. (when traffic dies, remove rule)
Or if you are running WordPress, just install wp-super-cache and when a traffic spike happens, click the "lockdown" button.
Header append X-Coral-Control "redirect-home"
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteRule ^(.*)$ http://your.domain.nyud.net/$1 [R,L]
Or even better, just redirect all traffic with news.ycombinator.com or reedit.com referer (before RewriteRule): RewriteCond %{HTTP_REFERER} ^http://([^/]+\.)?ycombinator\.com [OR]
RewriteCond %{HTTP_REFERER} ^http://([^/]+\.)?reddit\.com [OR]
You don't even have to manually disable caching after traffic dies down this way.Jekyll bootstrap is intended to deploy straight-away to GitHub pages so hosting is free. I'm not finished though so any more eyeballs I get on the source will definitely be helpful. Merry Christmas =)
[1]: http://bugsplat.info/2011-12-14-yet-another-not-very-static-...
But perhaps it is better than not storing and sharing your thoughts at all!
In any case...Merry Christmas HN!
Databases are indeed good at storing millions and billions of things and they are designed for it.But no human being is individually capable of creating content that really justifies a "dynamic programming oriented query plan generation" each time someone wishes to access his thoughts!
tl;dr My argument is that static site generation for personal blogs is common sense!
Also, creating content using a web-based editor that saves to a database is very easy for not-so-technical people to wrap their minds around. Static site generators? Not so much.