Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

FIX
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.

share|improve this question
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

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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