From the course: AWS Essential Training for Architects (2019)

Virtual servers (EC2) and Elastic IP - Amazon Web Services (AWS) Tutorial

From the course: AWS Essential Training for Architects (2019)

Start my 1-month free trial

Virtual servers (EC2) and Elastic IP

- [Instructor] Amazon Elastic Cloud Compute, or EC2, can be thought of as the servers in the cloud. When building applications on top of cloud infrastructure, servers are often part of the component architecture, depending on the application and use case, big, powerful servers may be required, and in other cases, smaller, less powerful ones may suffice. The application may only need just a few servers or it could require several hundred. Regardless of the exact size and quantity, many applications built in the cloud require some servers, and EC2 is the service that provides these servers. The elastic nature of EC2 makes the choice between big versus small and few versus many an easy one, because this can quickly be changed when using AWS. Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An elastic IP address is created at the account level and is not specific to a particular server instance. When a new elastic IP is created within an account, the account controls this address until a choice is made to explicitly release it. Unlike a traditional IP address, an elastic IP allows for an easy remap of a public IP to any instance in the account. Take, for example, a web application on a server with a public IP address. In this example, the domain is somedomain.com. There is a DNS server somewhere that holds the authoritative mapping of this domain to the IP address. What happens if the server dies? Using traditional hosting and a traditional static IP, this web application will be down. The next step to deal with this emergency would be to have a data technician replace the server or configure a new one. Even if the architecture was such that another server was standing by in anticipation of this failure, this new server would have a different IP address, which means the DNS setting would need to change. Even then, there is waiting for the DNS to propagate before the application is back online. With Amazon EC2 and elastic IPs this failure can be handled differently. Since the elastic IP is not tied to a specific server but rather the account, when disaster strikes, the IP of the failed server can be remapped to a new replacement server. No need to get any data technicians involved and no need to make any DNS changes. So when architecting applications in the cloud, consider using elastic IPs to failover gracefully when servers become unavailable. Use elastic IPs to quickly remap and failover to another set of servers so that the web traffic is routed to the new servers. This works great for handling emergencies, but can also be used for rolling out new versions of hardware and software.

Contents