Why Must You Laugh At My Back End
Disclaimer
I’m not a trained engineer or sys admin. Never even finished a book on it. But I’ve launched (and sold) a few things that have become popular (ref: here and here), so sometimes people ask me about my back end. Which ends up in blank stares, or worse.
OS:
Windows Server 2008. As for why not linux, I prefer working in a GUI and I’m pretty fast with it. I also read recently that Windows is now oddly more secure than its competitors. But I’ve personally never tried to hack either one (through the OS, at least) so I wouldn’t know. As for price, EC2 charges only slightly more for Windows than Linux - it’s roughly $20/month vs $15/month for a micro instance. Or 16-cents a day extra to use Windows.
Web Server
IIS 7. It does a lotta stuff. SSL not a problem. Htaccess not a problem (via “URL Rewrite”) free extension. Virtual websites not a problem. Extensibility not a problem (there are ISAPI plugins for everything). It even has a thing that thwarts DoS (though not DDoS) by denying floody IP addresses.
Language
CFML. I really like programming in CFML (a programming language, “ColdFusion Markup Language,” as opposed to ColdFusion, a commercial CFML interpreter made by Adobe). I know it’s not “cool” like Node.js or Clojure or even RoR. It’s got an old vibe. Not just because it was the first made-for-web programming language (tho it’s modern & updated frequently), but because whenever I meet other CFML coders, they’re always old dudes.
You can write CFML in tags like <cfquery> or you can write it in script with semicolons like Javascript. You can even write Java. ColdFusion runs in any JVM, and all Java code & extensions work great. But 99% of my stuff is CFML. CFML can spit out JSON if you want, and even contains Javascript libraries for doing AJAX, form validation, and other neat tricks — but I use Jquery for that nowadays. Some people cite Adobe’s high price tag (it’s insanely expensive, like over $1k/server), but there are free, open-source alternatives such as Railo or BlueDragon. I’ll probably use Railo for my next project.
Community
The CFML community seems particularly close-knit. Just Google any problem you’re having and you’ll find an answer quickly, or a nerdy (old) guy who can answer it for you in like 5 seconds.
Framework
There are a million (okay, literally over 10) popular frameworks for CFML. I don’t use em (they slow me down, and I think my code is relatively clean and encapsulated) but if you like frameworks, here ya go.
Database
Xeround.com. Cheap and “infinitely” scalable. Truly elastic — there’s no concept of “instances” — it just grows and grow with you. As long as Xeround sticks around and does what they say they can do, I’ll never have to worry about scaling my database (unless I get huge, like Twitter size, at which I will need to figure something else out).
Web Hosting and load balancing
Amazon EC2. Micro instances. First, I setup a perfectly-configured application server. Then I generate an AMI for it. Then I usually launch 5 cloned servers and connect them all with Elastic Load Balancing. Huge day? Just launch 50 new servers, easy as clicking a button, then shut em down after the spike. And remember, each server is only $20/mo. And one of these days I’ll figure out Amazon Auto-Scaling, which does this all automatically.
I used to use large and xlarge instances, but recently decided that, with micros, I can get the same performance for the same (or less) money, but with about 5x the redundancy. So if one server fails, it’s less of a big deal because there are others.
And eventually this’ll all go “elastic,” so that a single “instance” can scale infinitely. I’m looking forward to that. Is that sorta what Heroku and Google App Engine do? Or do you still need instances?
Syncing
My cloned servers all sync with Dropbox. I couldn’t find any examples of anyone else doing it this way. But Dropbox is great. If I change a file on any server, it gets sync’d to all the other servers within seconds. Advantage over Rsync: Dropbox keeps an offsite backup of the previous versions of each file. So if you’re like “oh fuck,” no worries — Dropbox has the old version.
Backups (other than aforementioned Dropbox)
JungleDisk. It runs automatically every night and sends me an email with details so I know it worked. Sends backups to either an S3 bucket, or a Rackspace cloud bucket (or whatever they call them).
That’s it. My apps run themselves and are scalable.
Windows, CFML, Dropbox, Xeround, JungleDisk, Elastic Load Balancing… it’s like the weirdest kids in school decided to dance.
If you’re reading this, chances are you were a weird kid too. And you know what it’s like to feel a little left out. And even though you want to be cool, you kinda like that you’re not.
Thanks for reading.
Pud (@pud)