ruby-on-railsrubyamazon-web-servicesamazon-simpledb

Are you using AWSDBProxy? Is there a performance hit when scaling out?


It seems that the only tutorials out there talking about using Amazon's SimpleDB in a rails site are using AWSDBProxy... Personally, I find this counter-intuitive to scaling out, considering the server layout of a typical Rails site below (using AWSDBProxy):

Plugin here: http://agilewebdevelopment.com/plugins/aws_sdb_proxy

Image here: http://www.freeimagehosting.net/uploads/91be4e0617.png

As you can see, even if we add more mongrels, we have two problems.

  1. We have a single point of failure far less stable than our load balancer
  2. We have to force all our information through this one WEBrick server

The solution is, of course, to add more AWSDBProxies... but why not then just use the following code in say, a class, skipping the proxy all together?

service = AwsSdb::Service.new(Logger.new(nil),
                                CONFIG['aws_access_key_id'],
                                CONFIG['aws_secret_access_key'])
service.query(domain, query)

So what I'm getting at, is if you are using AWSDBProxy, what are you justifications for it? And if you are indeed using it, what is your performance like? If you have hard numbers, this would be even more appreciated!


Solution

  • I'm not using it, nor have I ever heard of it, but this is what I would think are reasonable reasons.

    1. You're running your main app server on EC2, so the chance of Internet FAIL doesn't really affect you more than once.
    2. You run one proxy on each of your app servers. So it's connection going down is no worse than it's connection(s) to the database going down.
    3. Because it can be done. This is as good a reason as any in an open source project. Sometimes it takes building a thing before you know whether said thing is a good/bad idea.
    4. You don't have the traffic levels to need a load balancer. Then your diagram squashes down to a line, if not a single machine.