Common Mistakes I See Students Make
These are the load balancer mistakes I see after the lab: calling two A records a balancer, a health check left unhealthy, and trying to put another region inside one balancer. Read them once.
मित्रांनो, load balancer च्या या चुका मी lab नंतर बघतो: दोन A records ला balancer म्हणणे, health check unhealthy, आणि region एकाच balancer मध्ये घुसवणे. एकदा वाचून ठेवा.
दोस्तों, load balancer की ये गलतियाँ मैं lab के बाद देखता हूँ: दो A records को balancer कहना, health check unhealthy, और region एक ही balancer में घुसाना. एक बार पढ़कर रखो.
- Calling two A records a load balancer. IP1 still gets visitors after instance A is stopped. There is no health check.
- Installing Nginx on the load balancer. You cannot SSH to
lab-alband runsudo yum. Nginx stays on the EC2 instances. - Thinking one DNS name means one EC2. This lab has two EC2 instances. To serve reliably, keep healthy capacity in the selected target group. Zero healthy targets does not imply one particular HTTP code: distinguish no/unused targets (503), all unhealthy targets (fail open), and connection or response errors.
- Creating the balancer in only one subnet. An Application Load Balancer asks for two Availability Zones.
- Forgetting to allow port 80 from
lb-sg. Your own IP can open the instance, and the target stays unhealthy because the balancer is a different source. - Judging the page while the target is still initial. Wait until the status says healthy.
- Putting instance B only in
site-b-tgand expecting round robin on/. Round robin runs inside one group./usessite-a-tg. - A path rule that does not match.
/apiwithout the star can miss/api/. The lab value is/api/*. Check the priority number. - Expecting a Network Load Balancer to read the Host header. Host and path rules are the Application Load Balancer.
- Expecting the Application Load Balancer's address to be the static IP a partner typed last year. That fixed address is the Network Load Balancer.
- Opening a Classic balancer for a new lab.
- Adding a Singapore instance to
lab-alb. One Application Load Balancer does not span regions. The second region needs its own balancer. Route 53 chooses which balancer. - Turning on latency and geolocation for the same name and not knowing which answer you will get.
- Stopping the only healthy instance while the new one is still initial.
- Deleting the instances and leaving
lab-albbehind. Delete the balancer when class ends. Delete the extra Route 53 records you added for the paper region if you created them. Deregister targets first if the console asks. - One target group for pages, API, and checkout. A browsing spike then shares the checkout instances. Separate groups, with different desired counts.
- A health check path of
/when the app returns 302 to login. Every target looks unhealthy. Use/healthand a 200 with no login. - Making
/healthwait on the database. A short database blip then removes healthy web instances. - Putting the app tier balancer on the internet. Anyone can skip the web tier. Scheme internal, private subnets, 8080 only from the web security group.
- Trying to edit an existing balancer from internet-facing to internal. Create a new one. The scheme is chosen at create time.
- Registering RDS in the web target group. No load balancer in front of the primary. Writes do not round-robin across two primaries.
- Mixing balancer and target-group settings. ALB cross-zone is always enabled at the load-balancer level, but can be disabled at the target-group level. Keep it enabled for this lab. NLB also offers cross-zone settings; read both levels.
- Expecting one Application Load Balancer in Mumbai to own EC2 instances in Ireland. One public name, two balancers, Route 53 in front. That is not cross-zone.
- Latency records with no evaluate-target-health. A dead Mumbai group can still be the answer for Pune. Failover needs the health check.
Extended notes for this AWS lesson
Why students get stuck here
AWS pages look simple until three things collide: the service setting, the VPC/security group, and the app configuration. The expansions below separate those layers with real stacks and sample commands.
The same pattern in app stacks
Whether the data store is RDS MySQL, PostgreSQL, or another engine, apps read an endpoint + user + password from the environment.
Java / Spring Boot
spring.datasource.url=jdbc:mysql://ENDPOINT:3306/db with password from Secrets Manager / env.
Python / Django / Flask
HOST from env; never commit settings with real hosts.
Node.js
mysql2/pg clients with process.env.DB_HOST.
.NET
ConnectionStrings via env or Parameter Store.
PHP / Laravel
DB_HOST in .env, not in Git.
Go
database/sql with env-based DSN.
Indian company (sample)
Suppose we are a junior cloud engineer at Swiggy or Razorpay-style infrastructure. A new microservice cannot reach RDS. You check: 1) SG on RDS allows the app SG on 3306/5432. 2) App is in a private subnet with a route to the DB subnet. 3) The secret in Secrets Manager matches the rotated password. 4) You connect with the mysql/psql client from the app host before blaming the ORM.
Global practice
AWS Well-Architected Security and Reliability pillars: least-privilege SG, Multi-AZ for production relational DBs, automated backups, no public DB reachability.
Everyday analogy
A warehouse (RDS) should not open onto the street. Delivery bikes (app servers) enter through a staff gate (security group) with a badge (password/IAM auth).
Engines and ports
MySQL / MariaDB on RDS
Port 3306. Users and grants like self-managed MySQL.
PostgreSQL on RDS
Port 5432. Prefer scram auth.
SQL Server on RDS
Port 1433. Common with .NET shops.
Amazon Aurora
MySQL or PostgreSQL compatible; learn the endpoint types (cluster vs reader).
Load balancers in one breath
ALB is for HTTP/HTTPS apps (Spring, Node, Django, .NET). NLB is for extreme performance/TCP. GLB is for virtual appliances. Classic LB is legacy—prefer ALB/NLB for new work. Always put TLS on the balancer with ACM when you can.
Common EC2 and Linux mistakes (expanded)
- Losing the SSH key → use SSM Session Manager next time.
- Editing on the server without backups → keep AMI + user-data scripts.
- Opening 0.0.0.0/0 on SSH → restrict to your IP or VPN.
- Forgetting Elastic IP / DNS when testing restarts.
- Growing EBS without extending the Linux filesystem (growpart + resize2fs/xfs_growfs).
Common mistakes
- Publicly accessible RDS "for a quick test" left open.
- Mixing Classic LB advice with ALB listener rules.
- Hard-coding IPs instead of DNS names for RDS endpoints.
- Taking snapshots but never testing restore.
Worksheet
- Draw your VPC boxes: public subnet, private subnet, RDS subnet.
- Write the SG rules in a table.
- From the app host, run a one-line DB client connect.
- Take a snapshot and write the restore steps without looking.
Recap
- Service + network + app config.
- Private databases.
- Prefer ALB + ACM for web apps.
- Practise restore, not only backup.
Keep the regional example precise
In this lab, every target group uses instance ID registration in the balancer VPC. Those instances must belong to that VPC. This is the scope of the regional statements above.
An ALB is a regional service, but an IP-type target group can register supported private addresses reachable over peering, including a peered VPC in another Region. That advanced design still depends on the Region hosting the ALB. Separate regional balancers and DNS routing are the example here for independent regional front doors.