Hosting a Web Application in the Cloud using AWS – Part I

AWS architecture

AWS Cloud Basics

Amazon Web Services (AWS) is the leading on-demand cloud computing platform. At a broad level, AWS consists of a collection of independent services such as EC2, S3, RDS, etc. (more on these later). These services can be strung together to develop highly-available, highly-scalable and cost-effective web architectures.

Architecting in the Cloud

In order to host your web application on AWS, you have to understand how architecture on the cloud works. Also, you have to think of each aspect (computing, storage, database, etc.) of your hosting solution as separate entities that can be managed and scaled independently of each other. In AWS, the most commonly used services are:

1. EC2

This is the basic computing unit of your hosting architecture. Each EC2 instance consists of processing power and memory. You can think of EC2 as a single server with no storage. You can start an EC2 instance that has Linux or Windows pre-loaded using an AMI (Amazon Machine Image). Starting a new instance takes around 2 to 5 minutes. EC2 instances come in a lot of configurations that differ in the number of processing cores, the amount of RAM and the networking bandwidth.

Once provisioned, an instance can be scaled up vertically (by changing instance configuration to increase or decrease processors and RAM) or horizontally by adding or reducing instances that are bunched together behind a load balancer. An EC2 can’t do much on it’s own. At the very least, you have to associate some storage with it. This is where the EBS comes in.

2. EBS

Elastic Block Storage provides persistent block storage volumes for use with EC2 instances. You can think of this as the server hard disk. Amazon EBS volumes offer the consistent and low-latency performance needed to run your workloads. Furthermore, with Amazon EBS, you can scale your usage up or down within minutes. An EBS instance is usually attached to an EC2 instance in order to provide the storage needed for application files. If needed, you can detach an EBS instance from and EC2 instance, scale it up or down and re-attach the EBS back to EC2 instance effectively modifying you storage space on the fly. This is one of the major advantages of the cloud.

3. S3

Amazon Simple Storage Service (Amazon S3) is object storage with a simple web service interface to store and retrieve any amount of data from anywhere on the web. Cloud applications usually store user data using S3. This allows developers to scale their cloud platform without affecting the user data. Consequently, the EBS or EC2 instances can be turned off, replaced, scaled up or down and the user data will always be available on S3.

4. RDS

Almost all cloud architectures will make use of some sort of relational database backend. Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. Amazon RDS provides you six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle, and Microsoft SQL Server.

While it is possible to install your favorite database directly into the EBS and use it as you would in a dedicated server, when you deploy to the cloud, it is a lot better if you separated the database backend from your computing and storage. This is where you would use RDS. RDS can be provisioned and scaled independent of your other services.

5. SES

Amazon Simple Email Service (Amazon SES) is a cost-effective email service built on the reliable and scalable infrastructure that Amazon.com developed to serve its own customer base. With Amazon SES, you can send and receive email with no required minimum commitments – you pay as you go, and you only pay for what you use.

6. ELB

Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances. It enables you to achieve fault tolerance in your applications, seamlessly providing the required amount of load balancing capacity needed to route application traffic.

Elastic Load Balancing offers two types of load balancers that both feature high availability, automatic scaling, and robust security. These include the Classic Load Balancer that routes traffic based on either application or network level information, and the Application Load Balancer that routes traffic based on advanced application level information that includes the content of the request.

And Many More…

In conclusion, these are just a few of the most popular AWS services. In addition to these there are many other services that you can use depending on the type of application you are hosting. These include

  • SQS: Simple Queue Service for a fully managed message queuing service.
  • Route 53: a highly available and scalable cloud Domain Name System (DNS) web service.
  • SNS: Simple Notification Service: a fast, flexible, fully managed push notification service that lets you send individual messages or to fan-out messages to large numbers of recipients.
  • ElasticSearch / CloudSearch: for full-text and geo-spatial search
  • DynamoDb: a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.

In upcoming parts of this series, I will look in detail at how you can provision these services to create a basic hosted application on AWS.

Leave a Reply

Your email address will not be published. Required fields are marked *