by dangrossman · 14y ago · 0 comments
My own experience is that even the smallest Linode VPS, with an out-of-the-box WordPress install, serving a blog live from the database without a cache plugin, can handle all the traffic HN throws at even a #1 story on a work day afternoon. All it takes is setting the Apache config such that it won't spawn more processes than there's memory available, or using something lighter weight than Apache in the first place.
I know this is a foolish connection to make, that their ability to keep a blog online isn't connected to the things that will actually determine whether the business succeeds or fails, but I can't avoid thinking it nonetheless.
To turn this rant into something possibly useful, maybe some advice: it's important to figure out the basics of setting up a web server, not because it's a terrible thing for your blog to go down, but because you're losing out on all the prospective users/customers that come with being linked to and discussed on HN or other sites. Even if they can read a cached blog post, you're probably less likely to get them to go visit the startup you're blogging about during this short moment you have their attention.
The optimizations you need to make are fiddly black magic ("Your blog goes down too often? #1 culprit: a performance optimization called KeepAlive", "How many worker processes fit in 1 GB of RAM if each take ~20 MB on average? Did you answer 48? Crashes a day later. Did you answer 36? Crashes a week later. Did you answer 24? Crashes sporadically. Did you answer 20? Hasn't crashed... yet." "Blog still going down? OK, let's break with every quickstart guide on the Internet, throw out all the work you did for Apache, and switch you to Nginx. Now we'll have new failure modes!", "You incompetent nincompoop! You just need to add caching. Oh, you already cache everything? The KeepAlive issue can kill a blog hosting a simple static .txt file? Hmm, good point... put Varnish in front of it! A nice, simple solution! And if that doesn't work add cache to your caching so you've got caches for your caches!").
There's no point at which WordPress announces "OK, I'm ready!" -- you just pick your optimizations in advance then discover new requests-per-minute numbers or access patterns or what have you which cause it to degrade or bloom into a timed-out fireball of death.
Now I write a check every month for $200 to my hosting provider. Best money I ever spent, because this has lead to a 100% decrease in me having to wake up at 3 AM in the morning because Jimmy Wales decided to tweet a link to my blog.
Keeping WordPress up was a black hole of my time and talent, despite having shipped applications with substantially higher performance requirements than "Serve 20,000 visitors mostly static content over an eight hour period." This is totally orthogonal to programming skill or creating things that solve problems for customers.
Good point but if you go from being an employee to an entrepreneur you'll need to pick up a lot orthoganal skillsets beyond programming: sys admin'ing, basic accounting, copywriting, etc...I recall you tweeted a few weeks back, the gist of it being "if all you want to do is program you're better off being an employee".
That being said, congrats to the OP on taking the plunge, when I checked the site was back up and and it looks like you've got a solid concept. Best of luck to you.
If you want really serious uptime, use something like Jekyll and generate a static site which you host on S3/CloudFront and regenrate only as content changes. You obviously lose some flexibility, but an S3-hosted site is relatively inexpensive for the bandwidth (and do your own math to see if it's worth it for you on the time/money scale) and will handle any load you can throw at it. You can even maintain a crappy unoptimized WordPress installation as the origin server and serve everything up statically from Amazon CloudFront with no load impact to your site.
The first one is called Mezzanine and is available from http://mezzanine.jupo.org. There's a shopping cart called Cartridge (http://cartridge.jupo.org) that works very well with Mezzanine.
The second one is called Zinnia and is available from http://django-blog-zinnia.com. Unlike Mezzanine, which also has some CMS-related features, Zinnia is just a blog engine. However, Zinna works great with django-cms.
WordPress is a resource hog. I ditched it a long time ago and I couldn't be happier.
While it might be good to have a conversation on HN about when it is and isn't smart to try to do it all yourself (versus spending a little bit on a knowledgeable server guy, if you aren't one), I really wish yours wasn't the top comment in this thread right now.
This guy built something really cool, that hopefully will be useful to the "hackers" here -- I know it'll be useful to me, at least. It would be nice if we didn't shit on him here for having the page go down for a bit.
Here's a norm for HN that I suggest as a sensible default: If you're building stuff, we're on your side. We know building stuff is hard. We know early stuff is rough. Where others see flaws, we opportunities for having better stuff tomorrow.
This guy comes in here and says "Hey guys! I quit my job to pursue something I think will make my life better!" and you leave a comment deriding the guy for his _uptime_.
When I joined HN, it was a community of people all trying to lift each other up and push each other to do bigger, better things.
Please don't turn it into this.
i guess you've never had a site/app/product/lemonade-stand go down? you don't think the OP knows her blog is having problems? she needs you to call her out publicly? stop being such an ass.
However, I have to agree, keeping a blog up, which probably will only get a few thousands visits in a few hours, shouldn't be difficult. Switch from Apache, use Nginx. Then serve your static content from a CDN. NetDNA offers Bootstrap served for free at (http://www.bootstrapcdn.com/). Not sure which server side language you are using, but probably needs a bit of tweaking.
At any rate, these are just technical details. You can find other people to help you with these sort of problems.
Best of luck.
But bravo OP for having the courage to launch your own business! Good luck.
To the OP: Congrats on a great start and good luck with everything!
I do this for two reasons:
#1 - I don't want my blog to have anything to do with my service. I don't want it near my service. I don't want some WP-0-Day-Exploit to impact my application stack.
#2 - It is cheap and easy. At least it was when I started it five years go. If I could do it again I'd just use github for blogging/announcements like this. I could pay to manage this myself on another linode vps, but really, for 99.9% of the time it just doesn't matter.
With that said, if I was ever to post to HN about my business I'd probably cache the announcement on its own server (just raw html) and have all other links to my blog still remain at -big hosting provider- since 90% will just click on the link and 10% may dig deeper into the blog itself.
Personally I don't think it's a big deal that the blog is hosted on some big provider. I'd be more concerned if the service was there as well.
Earlier this month, when my Russell Kirsch story was #1 for most of the day, I didn't even know it did until someone emailed me. By then it had caught on beyond just HN and I had 60k-100k visitors come in overnight. I got my tech guy to transfer servers and speed things up, but you can't always plan for this type of thing.
Also, when you set up your company blog, make sure you set it up as a secondary group blog so that you can have multiple authors. If you start it off as a primary blog you can't change to a multi-author blog later.