How arun037/three-tier-architecture works
Main Components
• VPC: Represents the networking boundary, including public and private subnets, NAT, routing, and connectivity across multiple Availability Zones.
• Load Balancer (ALB): Handles incoming public traffic and directs it to the web tier.
• Auto Scaling Group (ASG): Manages EC2 instances for the frontend (web tier) and backend (application tier).
• Launch Templates: Provide instance configuration for your EC2 instances in the ASG.
• RDS: Represents the database tier responsible for data storage.
• Security Groups (SG): Define firewall policies controlling the traffic between these layers.
• Terraform modules: Create a modular, reusable approach for defining each resource (VPC, Launch Template, LB, ASG, RDS, SG).
Relationships and Data Flow
• Backend EC2 instances to the RDS instance in the private subnet, indicating secure, controlled data access.
• Auxiliary lines for modules—showing how each Terraform module (e.g., asg, launchtemplate, lb, rds, sg, vpc) encapsulates parts of the overall architecture.
• FROM the client to the load balancer,
• FROM the load balancer to the ASG (EC2 instance layer),
• FROM the backend EC2 instances to the RDS database.
• Use of modular design provided by Terraform modules. For instance, each directory (asg, launchtemplate, lb, rds, sg, vpc) represents a functional building block, suggesting a clean separation of concerns.
• That the project follows a “three-tier” pattern comprising presentation, application, and data layers.