⚡ ~/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 7 of 55 in Networking & Cloud DNS
Staff SRE / Principal Architect [L3] Networking Staff SRE Scenario [L3]
🎯 Target Role / Context: Networking Scenario #7 (L3) · Networking

Q: Your database is in a private subnet with a Network ACL (NACL) that explicitly allows port 3306 inbound from the application subnet (10.0.1.0/24). However, the DB connections are timing out. The Security Group allows 3306. What is wrong?

The problem is that Network ACLs are stateless.

#Networking #L3 #VPC #DNS #Security
🎙️ Candidate Opening & Architectural Context
""In our multi-VPC setup, services in private subnets ran into this exact routing obstacle. The interviewer is testing: Ephemeral ports, stateful vs. stateless firewalls.. 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: "In our multi-VPC setup, services in private subnets ran into this exact routing obstacle. The interviewer is testing: Ephemeral ports, stateful vs. stateless firewalls.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Production Solution & Architecture

The problem is that Network ACLs are stateless. Security Groups are stateful (if you allow an inbound request, the outbound response is automatically allowed). Because NACLs are stateless, returning traffic is blocked unless explicitly permitted. When the application server hits the DB on port 3306, the database must reply to the application server's random Ephemeral Port (usually ranging from 1024-65535, typical Linux is 32768-60999). You must add an outbound rule on the database subnet's NACL to allow TCP traffic across the ephemeral port range back to the application subnet 10.0.1.0/24.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: The problem is that Network ACLs are stateless.."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: The problem is that Network ACLs are stateless.
  • 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. Treating stateless Network ACLs as stateful firewalls without specifying outbound ephemeral return ports when configuring Networking database private Security Groups track connection state automatically, whereas stateless Network ACLs require explicit ephemeral port rules (1024-65535) for return traffic.
  2. Opening short-lived non-pooled TCP client connections, exhausting ephemeral ports in TIME_WAIT state when configuring Networking database private Rapidly opening and closing short-lived TCP sockets without connection pooling exhausts ephemeral ports, causing connection refusal errors.
  3. Directing load balancer health checks to heavy computational endpoints rather than dedicated health routes when configuring Networking database private Deep health check paths amplify database load during traffic spikes and risk cascading eviction of healthy application nodes.
  4. Triggering BGP route dampening by rapidly announcing and withdrawing multihomed network prefixes when configuring Networking database private Rapidly flapping BGP route announcements triggers upstream ISP route dampening, effectively blackholing network traffic for hours.
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 →