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

I'm new to AWS and currently using a single m1.medium EC2 instance to run an application. I've been reading up on AWS terminology, but there's one thing I haven't gotten a clear answer on. I know how to launch instances from the EC2 console, but how can I launch another EC2 instance and associate it with the one I currently have an application running on? Or am I entirely misunderstanding how this works?

I've read that the load balancer will add/remove instances according to performance, but since my domain name is associated to one IP address/instance, how do I get I the other instances to "point" to my application?

I guess my confusion stems from this example

As an example, a medium-sized website running on 10 Amazon EC2 instances in the US East (N. Virginia) Region could use one Elastic Load Balancer to balance incoming traffic. If the Elastic Load Balancer ended up transferring 100 GB of data over a 30 day period, the monthly charge would amount to $18 (or $0.025 per hour x 24 hours per day x 30 days x 1 Elastic Load Balancer) for the Elastic Load Balancer hours and $0.80 (or $0.008 per GB x 100 GB) for the data transferred through the Elastic Load Balancer, for a total monthly charge of $18.80.

How do you get an application to run 10 instances? Ok, so you create 10 instances, how does it know those aren't 10 different environments?

share|improve this question

closed as off-topic by Ward, Falcon Momot, mdpc, TheCleaner, cole Jan 29 at 18:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve." – mdpc, TheCleaner, cole
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

You reference a few different facilities in your question - one is Elastic Load Balancing, multiple EC2 instances, and DNS. You need to provide a bit more detail to get a clear answer.

If your 'domain name' is just pointed at a single IP, then you would not be able to have it associated with more than one instance.

You can take the very simple route of pointing your dns entry at multiple IPs (dns round robin), but that doesn't do a very good job of handling failover.

If you use Amazon's Route53 and set it up so that your domain name points to an elastic load balancer, you would be able to have as many instances configured behind that load balancer as you provisioned in EC2.

Neither happens magically though - you have to set things up to take advantage of having multiple instances.

share|improve this answer
    
Thanks. I purchased a domain name through GoDaddy and currently have my domain pointing to my EC2 instance's IP. If I don't go the load balancer route, I could just launch an instance, and then add that new instance's IP to my DNS file on GoDaddy? As for using the load balancer, what would you recommend in my situation? –  user1104854 Jan 20 at 5:01
    
Yes, but keep in mind that round robin DNS doesn't really do anything for failover - instead of just "server down", subsequent requests will often be "up/down/up/down/etc." –  Nathan Neulinger Jan 20 at 5:02
    
What is the intent of you adding an additional instance? More capacity or redundancy? Depending on what you're trying to accomplish - you may find it easier to split services - i.e. if you have a database-heavy site, split off your database onto second instance, and run the application code on the first instance. –  Nathan Neulinger Jan 20 at 5:03
    
More capacity. As far as the load balancer/route53 goes, does a load balancer get its own IP address? I haven't used route 53 so I'm not sure the details of it. –  user1104854 Jan 20 at 5:04
    
ELB has sortof a magic "lots of addresses" setup. Hard to explain - but if you're not using Route53, you're limited to using a CNAME pointing at a "ELB address", which means you can't directly use it for your domain-root (example.com) and can only use it for an individual host (www.example.com). Route53 provides 'ALIAS' capability so you can point your base domain at it. Google for 'ELB zone apex'. Another option is to implement the load balancer yourself, but that doesn't get you any failover, just load scaling. –  Nathan Neulinger Jan 20 at 5:12

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