I am new to EC2, just finished setting up my micro instance and ready for production.

I want to start w/ 2 medium instances.

How do i assign my elastic IP to both of them so they act as 1? also would they share dB as well?

My visualization is like a pair of raid drives where you have multiple machines acting as 1.
Am i going about it the right way? I have read that you should have 1 more instance than you need for redundancy.

Finally got Load Balancer to work on AWS. the logic I had going into this was off. Seems like it works as 1 instance reaches its max, the LB directs traffic to another instance.
Route 53 came in very handy for this whole setup.

  • 2
    Capital letters make reading text easier, at least for eyes trained in Western languages. I for one barely made it to the second sentence before giving up. I suspect I'm not the only one. – Wesley May 18 '12 at 3:34

If you want one ip address to go to two servers, you would need a load balancer instance using that one elastic ip address, and it sends the requests to either webserver. Such systems are typically done with HAProxy.

  • then i should'nt fire up 2 instance. rather just have 1 and a load balancer? – t q May 18 '12 at 0:21
  • Since I haven't used ec2 personally before, but I imagine you might be able to run HAProxy on a micro instance, and then have your web instances on mediums, and then your database on what you have found you need. Typically the want for multiple systems is for if one is killed some how. So you may want another HAProxy system that you could change the elastic ip. And you may want multiple database systems. – becomingwisest May 18 '12 at 0:32
  • 2
    AWS has load balancer option so im assuming it could replace HAProxy. so i'll go with that and 1 instance. thank you – t q May 18 '12 at 0:38

You can use Amazon's Elastic Load Balancer instead of running your own load balancer instance.

  • looking into it now. i understand the concept of load balancer's but basic questions. do i need to set up multiple instances? if so then how do i get it to share 1 elastic IP and 1 dB? – t q May 18 '12 at 14:06
  • 1
    You don't need an elastic IP if using ELB, you'd point your DNS at the ELB endpoint. Whether you need multiple instances depend on the load that you're expecting and what fault tolerance you want. You probably want to setup the database on a separate instance which the application instances all use. – mgorven May 18 '12 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.