1

Our startup has an app that's been in production for nearly a year running Rails/MySQL+MongoDB/Unicorn/Nginx successfully on a single Linode box.

We've recently decided to move to AWS for several reasons:

  1. Cost - we received several thousand dollars worth of AWS credit (through an accelerator program we're in), and it'd be a shame not to use it.
  2. Scalability - we're starting to receive quite a bit of press lately, and our user numbers are rising. For the cost of the Linode box and what we get in return, it won't scale well in the near future.
  3. Abilities - the AWS stack seems impressive in the capabilities and tools available, and I've heard and read a lot of good (and a bit bad) press about how it might be a good place to start growing.

Overall, the cost and scalability issues win for us, since free reliable hosting is hard to beat (well, until we run out of AWS credit). We've yet to secure funds so all IT costs come out of my own pocket (several $100's/mo).

So basically, I want to migrate our app to AWS, and I've been thinking about the following stack:

     Elastic-Load-Balancer
              |
              |
[1+ Rails App over Unicorn/Nginx]
              |
              |
[1+ DB Server (MySQL + MongoDB)]

Where the App or DB servers can grow horizontally as needed. Since we're not really pushing the breakpoint yet, I was thinking to just start with 1 app server, 1 db server (not RDS, for now) and ELB + Route53 to manage DNS and load balancing.

I've never used AWS and am no DevOps expert, so I wanted feedback on a few things:

  1. How should I manage the web server part of the stack with respect to unicorn+nginx setup? Up until now, it was all on the same machine and therefore not a big issue. Should I keep my nginx.conf setup and just have nginx listen on ports 80/443 on each App instance?
  2. I'd like to be able to grow the App layer by simply adding more instances (AMI's) as needed. Will this be manageable in the short-run? E.g - until we have money to hire a devops guy or close shop due to poverty :)
  3. Any other lessons learnt or things to keep in mind will be greatly appreciated.

Note - for various reasons I don't want to use OpsWorks just yet: our App server is very customized, no Mercurial support, not very mature, etc.

Thanks.

sa125
  • 325
  • 1
  • 7
  • 14

1 Answers1

2

Aws can provide the scalability in case you need it Architecture suggestions

  • use elb for first tier
  • use two or more app servers (for redundancy reasons)
  • use rds if you can

Now ... If rds is not an option you will end up with a master db and a slave. For the db I recommend ebs volumes that are striped.

Config management it can be anything really as long as you are comfortable with it. Of course there is chef, puppet and the likes.

silviud
  • 2,687
  • 2
  • 18
  • 19