Virtuous cycle

Bartlomiej Owczarek weblog

You are currently browsing the Virtuous cycle weblog archives for tag 'ec2'.

Return to 'Virtuous cycle' home page

You can now run EC2 servers in Europe – how faster it is?

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
  • 46ms
  • 17ms
  • 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.

I’m going to try Rails on EC2

I’m not exactly in a stage of getting into technical details, but I already kind of decided that I will switch to Ruby on Rails for development of the current project.

Reasons: learning rails would probably be no harder than staying with PHP and learning framework like Zend, which is where I stopped last time.

And RoR promises much improvement with time-to-market.

Having sort of decision on rails, I wanted to have an initial idea of available hosting options, also for the needs of a “back of an envelope” business case.

I’m very happy with my current provider, progreso, but sadly they don’t support rails on shared servers, yet. If I wanted to host with them, I would have to buy a dedicated server anyway.

But as far as dedicated servers are concerned, Amazon’s EC2 looks much more attractive (at least at a first glance).

As for pricing, basic virtual servers are cheaper than in case of progreso (like, $70 a month excluding bandwidth and additional storage).

Additionally, path to hosting Rails applications on EC2 seems already well-beaten. For example here: Deploy a Ruby on Rails app on EC2 in five minutes. There are even Polish startups (shoptrix) who chose this solution.

And of course the most advertised benefit of using EC2 is the ability to increase capacity on pay-as-you-go basis, by easily launching new virtual servers when necessary.