⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 998+ 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) →
Junior / Associate DevOps [L1] Networking Core Fundamentals [L1]

Q: A customer complains of intermittent 502 Bad Gateway errors from an AWS Application Load Balancer. The backend instances show low CPU. What should you look for?

A 502 Bad Gateway from an ALB means the ALB tried to communicate with the target instance, but the connection dropped or the target retur...

#Networking #Networking #L1 #VPC #DNS #Security
🎙️ Candidate Opening & Architectural Context
""When an interviewer asks how I diagnose network connectivity, I follow an outside-in OSI model approach. The interviewer is testing: Load balancer timeout configurations, application keep-alive.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Production Solution & Architecture

A 502 Bad Gateway from an ALB means the ALB tried to communicate with the target instance, but the connection dropped or the target returned an invalid response. The most common cause, aside from the app actually crashing, is a mismatch in Keep-Alive timeouts. If the backend web server (like Nginx or Node.js) has an idle timeout configured shorter than the ALB's idle timeout (default 60 seconds), the backend might close the TCP connection just as the ALB decides to send a new request down that established pipe. The ALB gets a connection reset and throws a 502. The fix is to ensure the backend application's idle timeout is greater than the ALB's idle timeout.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: A 502 Bad Gateway from an ALB means the ALB tried to communicate with the target instance, but the connection dropped or the targe."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: A 502 Bad Gateway from an ALB means the ALB tried to communicate with the target instance, but
  • Run targeted verification commands before modifying configuration.
  • Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement
Want more Networking scenarios?
Explore our complete collection of scenario-based Networking interview runbooks.
Browse All Networking Questions →

📚 Related Production Scenarios in Networking