1、How.NET runs on Azure App ServiceEdi Wang35 y/o Senior Software EngineerMicrosoft MVP(Azure)since 2017Author of project Moonglade,an ASP.NET Core blog system runs on Azure,used by many Microsoft employeesCreator and former contributor of Windows App?Character Map UWP?,reaching over 40M global usersO
2、perating the WeChat video account introducing technologies like Azure,committed to no advertisements,no course sales.Edi WangAzure&.NET DeveloperAzure App ServiceAzure Kubernetes Service(AKS)Azure Container InstanceAzure Container AppsPaaS Services to run.NET on AzureQuickly and easily create enterp
3、rise-ready web and mobile apps for any platform or device,and deploy them on a scalable and reliable cloud infrastructureAzure App ServiceAzure Resource ManagerGeo-MasterEast AsiaWest US?Scale Unit Scale Unit Scale UnitScale UnitScale UnitScale UnitScale UnitScale UnitLayer 7 load balancer(IIS-YARP)
4、Round-robin(RR)algorithmFront-End RoleScale UnitWeb WorkerSupport Servers(Role)Front-end RoleApp Service PlanDedicated Worker PoolASP with 2 ServersScale outMultiple ASPsWeb WorkerWindows Plan+Code DeploymentExtra Runtimevar builder=WebApplication.CreateBuilder(args);var app=builder.Build();var isIn
5、Docker=Environment.GetEnvironmentVariable(DOTNET_RUNNING_IN_CONTAINER)?false.ToString();app.MapGet(/,()=$DOTNET_RUNNING_IN_CONTAINER:isInDocker);app.Run();Linux Plan+Code DeploymentDownload Docker LogsThe Container Image2023-11-23T13:24:42.649Z INFO -Initiating warmup request to container demo996_2_
6、2bb3ad40 for site demo9962023-11-23T13:24:59.646Z INFO -Waiting for response to warmup request for container demo996_2_2bb3ad40.Elapsed time=16.996715 sec2023-11-23T13:25:23.846Z INFO -Container demo996_2_2bb3ad40 for site demo996 initialized successfully and is ready to serve requests.2023-11-23T13