Here is the journey of a request such as https://www.contoso.com/api/orders to an ASP.NET Core app on Azure App Service. 1. DNS resolution - The custom domain resolves through DNS (CNAME to contoso.azurewebsites.net, or to Azure Front Door or a CDN if one is in front). App Service validates domain ownership with an asuid TXT record. 2. Optional edge layer - Azure Front Door or Application Gateway may sit in front, providing global load balancing, WAF protection, TLS termination and caching, then forwarding to the App Service origin. Access restrictions on App Service can ensure only Front Door traffic is allowed. 3. Arrival at the App Service front ends - The request reaches the scale unit's front-end load balancers, which terminate TLS using the bound certificate (managed or uploaded), enforce HTTPS-only and the minimum TLS version, and apply access restrictions (IP rules, service endpoints, private endpoints). 4. Platform features before your code - If enabled, App Service Authentication (Easy Auth) runs as a module and can authenticate the user with Entra ID. - The front end routes the request to one of the app's worker instances (the App Service plan's VMs). ARR affinity cookies can pin a client to an instance; disable them for stateless apps. 5. Hosting process - Windows: IIS with the ASP.NET Core Module, usually in-process hosting. - Linux: a container running the app, typically Kestrel behind the platform's proxy (forwarded headers carry the original scheme and client IP). 6. ASP.NET Core pipeline - Middleware runs: exception handling, HSTS, HTTPS redirection, routing, CORS, authentication (JWT validation), authorization, then the endpoint. - The controller calls services, which access Azure SQL, Cosmos DB, Redis or Storage — often over private endpoints through VNet integration — authenticating with a managed identity. Secrets come from Key Vault. 7. Response - Travels back through middleware, out through the front ends to the client (and Front Door, which may cache it). 8. Observability and operations - Application Insights collects requests, dependencies and exceptions; App Service logs and metrics go to Azure Monitor; health checks remove unhealthy instances; autoscale adds instances based on rules; deployment slots allow zero-downtime releases.
Ravindra Wadile · · 0 likes