Ravindra BagaleCourses & study guides मराठी

Ravi Sir's Cards › DevOps

Chapter 45: Terraform 3-Tier Architecture in a Single Availability Zone: Cards

मराठी cards · Open the chapter

Revision cards

Single-AZ 3-tier design: the network. A 3-tier app splits work into web (pages), app (logic) and database (data). Each tier sits in its own subnet, so a hacked web server cannot reach the data directly.
Revision card 1 of 5: Single-AZ 3-tier design: the network · Download PNG · Open card page

Lesson: 45.1 The single-AZ 3-tier design, file layout and network

3-tier security groups: web, app, database. A security group is a firewall around each server. In a 3-tier app, the database must never be reachable from the internet.
Revision card 2 of 5: 3-tier security groups: web, app, database · Download PNG · Open card page

Lesson: 45.2 Security groups for web, app and database tiers

Web tier and app tier EC2 servers. EC2 servers are AWS virtual machines. The web server talks to users; the app server does the work and talks to the database, safely hidden in a private subnet.
Revision card 3 of 5: Web tier and app tier EC2 servers · Download PNG · Open card page

Lesson: 45.3 Web tier and app tier EC2 servers

Database tier: DB subnet group and single-AZ RDS. RDS is a database AWS runs for you. A DB subnet group tells RDS which private subnets it may use. AWS always needs subnets in at least 2 zones in the group.
Revision card 4 of 5: Database tier: DB subnet group and single-AZ RDS · Download PNG · Open card page

Lesson: 45.4 Database tier: DB subnet group and single-AZ RDS

Apply, test and destroy the single-AZ 3-tier stack. Building is only half the job. You must prove each tier talks only to the right tier, then delete everything so AWS does not keep billing.
Revision card 5 of 5: Apply, test and destroy the single-AZ 3-tier stack · Download PNG · Open card page

Lesson: 45.5 Apply, test and destroy the single-AZ 3-tier stack

Interview cards

Why would you build a 3-tier app in a single Availability Zone, and what is the risk? An Availability Zone (AZ) is one data centre group inside an AWS Region. One AZ is cheaper and simpler: one NAT, one server per tier. The risk: if that AZ has an outage, the whole app is down.
Interview card 1 of 5: Why would you build a 3-tier app in a single Availability Zone, and what is the risk? · Download PNG · Open card page

Lesson: 45.1 The single-AZ 3-tier design, file layout and network

In a 3-tier app, how do you make sure only the app tier can reach the database? Put the database in a private subnet (no route to the internet) and give it a security group that allows port 3306 only from the app tier’s security group.
Interview card 2 of 5: In a 3-tier app, how do you make sure only the app tier can reach the database? · Download PNG · Open card page

Lesson: 45.2 Security groups for web, app and database tiers

What is user_data on an EC2 server, and when does it run? user_data is a script you give to an EC2 server. It runs once, as root, on the first boot. It is used to install and start software, like nginx.
Interview card 3 of 5: What is user_data on an EC2 server, and when does it run? · Download PNG · Open card page

Lesson: 45.3 Web tier and app tier EC2 servers

What is a DB subnet group, and why does it need 2 Availability Zones? A DB subnet group is the list of subnets where RDS (AWS’s managed database) may place the database. AWS requires subnets in at least 2 Availability Zones, so it can move or add a standby copy later.
Interview card 4 of 5: What is a DB subnet group, and why does it need 2 Availability Zones? · Download PNG · Open card page

Lesson: 45.4 Database tier: DB subnet group and single-AZ RDS

Why does terraform destroy fail or hang on an RDS database? By default RDS takes a final snapshot (a backup) before deleting, and needs a name for it. deletion_protection also blocks deletes. In a lab, set skip_final_snapshot = true and deletion_protection = false.
Interview card 5 of 5: Why does terraform destroy fail or hang on an RDS database? · Download PNG · Open card page

Lesson: 45.5 Apply, test and destroy the single-AZ 3-tier stack

Comparison cards

Public subnet vs private subnet. A subnet is a slice of your AWS private network (VPC).Public subnet: its route table sends 0.0.0.0/0 to an internet gateway.Private subnet: no route to the internet gateway.
Comparison card 1 of 3: Public subnet vs private subnet · Download PNG · Open card page

Lesson: Chapter 45: Terraform 3-Tier Architecture in a Single Availability Zone

Single-AZ vs Multi-AZ design. An Availability Zone (AZ) is a separate data centre group inside one AWS Region.Single-AZ: everything in one zone.Multi-AZ: copies of each tier in 2 or more zones.
Comparison card 2 of 3: Single-AZ vs Multi-AZ design · Download PNG · Open card page

Lesson: Chapter 45: Terraform 3-Tier Architecture in a Single Availability Zone

user_data script vs custom AMI. Both prepare a new EC2 server.user_data: a script that runs on the first boot and installs software then.Custom AMI: a saved server disk image with the software already installed.
Comparison card 3 of 3: user_data script vs custom AMI · Download PNG · Open card page

Lesson: Chapter 45: Terraform 3-Tier Architecture in a Single Availability Zone