I just reached the first milestone – deploying my application into a production server. Roughly at the same time, Amazon announced that it is now possible to have EC2 instances running on data centers located in Europe.
What is EC2? It’s a platform which allows you to run your application on arbitrary number of virtual servers. EC2 charges for servers on hourly basis, so it allows, in principle, to scale very flexibly.
From the very beginning I wanted Ogito to run on EC2.
Having servers located in Europe is a good thing, because latency is lower – ie. requests get handled faster because they don’t have to travel back and forth over the ocean. But I wanted to have some idea what the difference would be and ran couple of pings from my home location. Results:
- EC2 us-east instance: 120ms
- EC2 eu-west instance: 60ms
- Google.pl: 46ms
- Progreso.pl: 17ms
- Onet.pl: 15ms
60ms. Doesn’t beat local hosting, but better than hosting in the US.
For now my app is running in the us-east region, anyway, because ec2onrails AMI that I use (AMI is a server “template”) is not available in Europe yet. I was a bit surprised that one cannot access public AMIs across the regions, but that’s the way it works – regions are very self-contained.
Side note 1: I deployed my app successfully over the weekend, upgrading ec2onrails image to rails 2.2.2 and doing some other modifications. Hooray!
Side note 2: that said, the app currently is able to only display “come back later” page without any errors:)
Side note 3: I wish I had a place to write about more geeky stuff, I don’t like writing them here because my friends would find them hard to digest, while having another side blog never worked for me.