⚡ ~/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 Linux & SRE Interview Questions Scenario 37 of 135 in Linux & SRE
Junior / Associate DevOps [L1] General DevOps General DevOps — Scenario-Based Interview Questions Core Fundamentals [L1]
🎯 Target Role / Context: General DevOps Scenario #34 (L1) · General DevOps — Scenario-Based Interview Questions

Q: What is an API Gateway, and how does it differ from a standard Load Balancer?

A standard Load Balancer (like a Network Load Balancer) primarily operates at Layer 4, simply forwarding raw TCP packets to backend IPs.

#General DevOps #L1 #DevOps #SRE #Architecture
🎙️ Candidate Opening & Architectural Context
""When an interviewer asks about this scenario, I explain how we balanced incident response with long-term prevention. The interviewer is testing: OSI Layer 7 routing, API management, authentication offloading.. 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? The Linux Foundation's Certified System Administrator (LFCS) & SRE Track covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: "When an interviewer asks about this scenario, I explain how we balanced incident response with long-term prevention. The interviewer is testing: OSI Layer 7 routing, API management, authentication offloading.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Production Solution & Architecture

A standard Load Balancer (like a Network Load Balancer) primarily operates at Layer 4, simply forwarding raw TCP packets to backend IPs. An API Gateway operates at Layer 7 and is specifically designed to manage API logic. While it performs load balancing, its primary job is routing HTTP requests based on URL paths (/users goes to Service A, /billing to Service B), handling rate limiting, request validation, payload transformation, and acting as a centralized authentication layer (e.g., verifying JWT tokens) before traffic ever reaches the backend microservices.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: A standard Load Balancer (like a Network Load Balancer) primarily operates at Layer 4, simply forwarding raw TCP packets to backen."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: A standard Load Balancer (like a Network Load Balancer) primarily operates at Layer 4, simply f
  • Run targeted verification commands before modifying configuration.
  • Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
⛔ 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 General Gateway differ 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 General Gateway differ 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 General Gateway differ 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 General Gateway differ Target instances must explicitly permit inbound HTTP/HTTPS traffic from the ALB security group on the configured container/application port.
Advertisement
Want more Linux & SRE scenarios?
Explore our complete collection of scenario-based Linux & SRE interview runbooks.
Browse All Linux & SRE Questions →