⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Networking & Cloud DNS Interview Questions Scenario 5 of 55 in Networking & Cloud DNS
Senior DevOps / SRE [L2] Networking Production Scenario [L2]
🎯 Target Role / Context: Networking Scenario #5 (L2) · Networking

Q: What is the difference between an Application Load Balancer (ALB) and a Network Load Balancer (NLB)? When do you use which?

ALB (Layer 7): Operates at the Application layer. It understands HTTP/HTTPS headers, URLs, and cookies.

#Networking #L2 #VPC #DNS #Security
🎙️ Candidate Opening & Architectural Context
""Networking issues can paralyze distributed applications. In our hybrid cloud architecture, we traced this packet path. The interviewer is testing: OSI model, Layer 7 vs Layer 4, TLS termination.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? KodeKloud's Istio Service Mesh & Advanced Kubernetes Networking Course covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: "Networking issues can paralyze distributed applications. In our hybrid cloud architecture, we traced this packet path. The interviewer is testing: OSI model, Layer 7 vs Layer 4, TLS termination.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Initial Diagnostics & Root Cause Analysis

  • ALB (Layer 7): Operates at the Application layer. It understands HTTP/HTTPS headers, URLs, and cookies. You use it when you need path-based routing (e.g., /api to one target group, /images to another), WebSocket support, or advanced WAF integrations. It terminates the connection and creates a new one to the backend.
  • NLB (Layer 4): Operates at the Transport layer. It only understands IP addresses and TCP/UDP ports. It is incredibly fast, handles millions of requests per second with ultra-low latency, and provides a static IP address. You use it for non-HTTP traffic (like databases, SSH, or custom TCP protocols) or when you require end-to-end TLS where the backend terminates the certificate.
2️⃣

Remediation & Permanent Safeguards

Execute the resolution runbook and verify workload health:

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: ALB (Layer 7): Operates at the Application layer. It understands HTTP/HTTPS headers, URLs, and cookies. You use it when you need p."
⚡ 60-Second Elevator Pitch Talking Points
  • ALB (Layer 7): Operates at the Application layer. It understands HTTP/HTTPS headers, URLs, and co...
  • NLB (Layer 4): Operates at the Transport layer. It only understands IP addresses and TCP/UDP port...
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Confusing ALB 502 Bad Gateway (target connection reset) with 504 Gateway Timeout (upstream response timeout) when configuring Networking difference Application 502 indicates the backend target closed the TCP connection prematurely or returned malformed HTTP, whereas 504 means the target failed to respond before idle timeout.
  2. Setting target deregistration delay to zero instead of allowing connection draining when configuring Networking difference Application Instant target deregistration severs in-flight HTTP requests during auto-scaling scale-in or rolling deployments, causing immediate user-facing drops.
  3. Failing to query CloudWatch ELB metrics (HTTPCode_ELB_5XX vs HTTPCode_Target_5XX) during load balancer outages when configuring Networking difference Application Comparing load balancer generated errors against target generated errors immediately isolates whether the issue lies in the proxy tier or application runtime.
  4. Overlooking Security Group rules on backend EC2/ECS instances that block health check traffic from the ALB when configuring Networking difference Application Target instances must explicitly permit inbound HTTP/HTTPS traffic from the ALB security group on the configured container/application port.
Advertisement
Want more Networking & Cloud DNS scenarios?
Explore our complete collection of scenario-based Networking & Cloud DNS interview runbooks.
Browse All Networking & Cloud DNS Questions →