Three tier web application

In AWS, a three-tier architecture divides an application into presentation, application, and data tiers, with each tier serving a specific function: presentation for user interface, application for business logic, and data for storage. This segmentation facilitates scalability, security, and maintenance by isolating components, enabling independent scaling, and targeted management based on the application's needs.

3/26/20242 min read

This diagram represents a three-tier architecture deployed on AWS, consisting of a Web tier, Application tier, and Database tier. Here's a detailed explanation of the components and their roles:

1. Web Tier:

- The Web tier consists of an Auto Scaling group of Amazon EC2 instances behind an Application Load Balancer (ALB).

- The ALB distributes incoming traffic from the internet across the EC2 instances in the Auto Scaling group.

- The instances in the Web tier are deployed in a public subnet within an Availability Zone (us-east-1a) of the VPC (10.100.1.0/24).

- The Web tier communicates with the Application tier through the NAT Gateway.

2. Application Tier:

- The Application tier also consists of an Auto Scaling group of EC2 instances behind an Application Load Balancer.

- The instances in the Application tier are deployed in a private subnet (10.100.11.0/24) of the VPC.

- The Application tier communicates with the Database tier through the private subnet (10.100.13.0/24).

3. Database Tier:

- The Database tier consists of a Multi-AZ deployment of Amazon RDS instances.

- The RDS instances are deployed in private subnets (10.100.13.0/24 and 10.100.14.0/24) across multiple Availability Zones (us-east-1a and us-east-1b) for high availability.

4. Network Configuration:

- The architecture is deployed within a VPC (10.100.0.0/16) in the us-east-1 region.

- The Web tier and Application tier are separated into different subnets for security and isolation purposes.

- The Database tier is deployed in its own private subnets, isolated from the internet for enhanced security.

- The NAT Gateway enables the Web tier instances to communicate with the Application tier instances in the private subnet.

5. Load Balancing and Auto Scaling:

- The Application Load Balancers (ALBs) distribute incoming traffic across the EC2 instances in the respective Auto Scaling groups for high availability and scalability.

- The Auto Scaling groups allow automatic scaling of EC2 instances based on demand, ensuring optimal resource utilization and performance.

6. High Availability and Fault Tolerance:

- The deployment across multiple Availability Zones (us-east-1a and us-east-1b) provides high availability and fault tolerance for the Application tier and Database tier.

- In case of an Availability Zone failure, the remaining resources in the other Availability Zone can continue serving traffic.

This three-tier architecture follows best practices for web applications, separating the components into distinct tiers for better scalability, security, and fault tolerance. It leverages AWS services like EC2, Auto Scaling, Elastic Load Balancing, NAT Gateway, and RDS to build a highly available and scalable infrastructure.