Amazon EC2 As A Webhost Redux

July 9th, 2009

Back in 2007 I looked at EC2 for a web server and while it wound up being feasible it had a number of drawbacks:

Those familiar with EC2 won't be surprised to hear that we won't be going with the service for three reasons:

  1. It's at least as expensive as the dedicated server we'd need.
  2. The filesystem gets reset everytime the server reboots (S3 provides a REST API to store and retrieve data, not a filesystem)
  3. The server gets a new IP address every time it reboots.

Since then Amazon have rolled out new services that solve problems 2 and 3 and reserved instances to help with 1. What surprises me after a couple of years running a single EC2 instance with an app that’s using S3 for storage though is just how stable it has been.

Remember that EC2’s original point in life was scalability, not running one single instance for a really long time. They’ve done tons of upgrades to their infrastructure over the last couple of years as well which normally would mean down time and migrations. You can imagine my surprise when I checked how long it’s been since the instance rebooted:

e2wiki:~# uptime
 04:28:45 up 499 days, 19:14,  1 user,  load average: 0.33, 0.10, 0.03

Just shy of 500 days since a reboot for any reason. I can’t say that about any other hosting service I’ve ever used so even if EC2 is more expensive, it’s seriously reliable.

Now we just need to fix the memory leak in the app we’re running on that server – it up and dies a couple of times a week. That said, the script that automatically restarts it is so effective that the external monitoring tools don’t even notice so it’s probably not worth the effort.

I Hate Deployment

May 29th, 2009

Deployment ruins everything. So many cool technologies that let you develop more rapidly and do awesomely cool stuff fall down at the last hurdle of deployment. Sometimes it’s because they haven’t thought it through properly so it’s just plain too hard, but often it’s just that it’s too hard to convince people that it won’t be another headache for them.

The latest in my deployment-caused frustrations is CouchDB. I have a few use cases that I think CouchDB would be perfect for and it would save me heaps of development effort and headaches. The trouble is, while CouchDB may be of the web, it really isn’t of the enterprise IT architecture.

That’s not to say it wouldn’t fit in perfectly well. It’s not to say there’s anything wrong with CouchDB. It doesn’t even mean that it would be hard to deploy or hard to maintain or anything to do with CouchDB at all. It’s just not part of the enterprise plan for “stuff we put on our servers”. Database stuff goes in Oracle or DB2 and we really don’t need a second database instance running. The fact that CouchDB is an entirely different type of database and has completely different strengths and weaknesses making it perfect for this particular use case doesn’t get a hearing.

When you have big enterprise as your clients, the cool toys always seem just out of reach1.

I’d wish that I worked in an environment that was more relaxed and we could deploy tons of different systems based on what was the best fit for this particular job, except that I have that problem within Ephox and it’s not so much fun either.

1 – like Java versions above 1.4…

200 Means OK!

November 21st, 2008

While many web visionaries are busy advocating the correct use of ETags and URIs etc etc, I just wish people could get the very basics of HTTP right.  I’m not even talking about mime-types here, just status codes would be a really good place to start.

If you’re returning the page as requested, use 200.

If you’re returning a server error, use 500.

If the requested page doesn’t exist, use 404.

If you can follow even just those three rules, you’ll make life so much easier for user agents. Anything about that is great too, but whatever you do, please get these basics right.

Epic fail to IIS and IBM Portal on these points.  Something is seriously wrong with the internet…

I Love mod_proxy

November 1st, 2008

After my amazingly successful use of mod_proxy to provide clean URLs in an IWWCM instance, it’s been added to my bag of useful tricks to know about.  When you realize you can proxy differently based on the current virtual host it’s a very powerful solution.

My latest use for it was to add name based virtual host support to two completely separate virtual machines.  One machine runs IBM WCM and the other runs Quickr. Both use the same port, and in the future there will be more VMs with different versions as well, so while it would be possible to assign different port numbers, I’d prefer to not have to remember which VM is using which port etc.  The firewall however can only forward connections on a given port to one VM.

The solution then is to forward the traffic to Apache and configure mod_proxy within name based virtual hosts. Effectively Apache is acting as an intelligent HTTP router and I can add any number of VMs by adding a new CNAME and virtual host entry.

Exporting and Importing a Portal WCM Library

August 18th, 2008

I’m going to need this soon and I’ll never find the link again in the IBM forums so I’m putting it here.

Exporting and Importing a Web Content Library

It should let you move web content (minus drafts and previous versions unfortunately) from one IWWCM server to another.