Interview Prep/Azure/Reliability, Cost and Migration

App Service instances keep running out of SNAT ports when calling external APIs. What do you design?

AdvancedScenarioReliability, Cost and Migration
Answer

Situation read → Outbound connection churn exhausts the limited SNAT allocation per instance.

What I'd do →

  1. Fix the app: reuse HTTP clients (connection pooling, HttpClientFactory in .NET), keep-alive
  2. VNet integration with NAT Gateway for large SNAT capacity
  3. Private Endpoints for Azure services so traffic doesn't use SNAT
  4. Monitor "SNAT Port Exhaustion" in App Service diagnostics

Why → Code fixes reduce demand; NAT Gateway raises supply.

Interview tip → Always mention connection reuse first.

Azure All Azure questions

More on Reliability, Cost and Migration