Considerations for Migrating .NET Applications to App Service or Azure Container Instances (ACI)

Published Nov 03 2021 10:45 AM 886 Views
Microsoft

This blog is for the purpose of sharing a few considerations from FastTrack for Azure engineers for customers migrating on-premises .NET applications to App Service or Azure Container Instances (ACI). This includes both non-container and container scenarios where a customer has evaluated various compute services for their applications and chosen the “non-orchestrator” App Service or ACI route instead of the orchestrator Azure Kubernetes Services (AKS) route. You can find our candidate service flowchart here or here (there is some overlap but also information presented in a different manner so both are highly useful). Because we describe this as the “non-orchestrator” route does not mean there will be no orchestration. In this sense, you will do much of the orchestration with the support of the tooling, making conscious decisions that an orchestrator would make on your behalf (with some configuration, of course). There will also be guidance in another post for the orchestrator route.

Rationalization and Remediation

The process of evaluating your applications to best determine how to migrate or modernize has a term called cloud rationalization. As you are making these decision, we suggest that you find out more about “the five Rs” of rationalization here. where apps are simply rehosted in the cloud with no changes in virtual machines. At some later time, the app will be rearchitected/refactored to take advantage of both the cost savings and greater interoperability of cloud-native services. There are also the cases where apps are candidates to be migrated directly into PaaS services with little more than configuration changes, such as a database connection.

 

What we think needs to be added to this vocabulary is the category of remediation, where customers don’t want a simple lift and shift but want to remediate existing apps to allow them to be rehosted in a PaaS service without taking advantage of PaaS services (some might still call this refactoring, but refactoring is more of a case of making changes to specifically take advantage of the PaaS model on a cloud platform). An example of this is migration of an ASP.NET Framework application that uses GAC assemblies, COM/COM+ components or uses port bindings other than 80/443. None of these will migrate to App Service PaaS service because they are not supported, even though the first two could simply be containerized and migrated to App Service Web App for Containers as is (but that wouldn’t be PaaS in the sense of taking advantage of its specific capabilities). If the customer indeed wants to migrate to App Service PaaS services, then the apps must be remediated, which will take some work, but is far short of a complete re-architecture/rewrite.

Containerization as Remediation

Containerization as a means of remediating an application that needs to be migrated to Azure provides a number of benefits. The first is that the application can be moved “as is” into Azure, immediately taking advantage of the PaaS platform, even though not fully. The existing Basic, Standard, and Premium App Service plans include container support for both Linux and Windows workloads at no additional cost.

 

Even though Web App for Containers is more costly than Virtual Machines, there is no worry of OS maintenance, and over time as the containerized applications are modernized, there can be a stepwise motion of refactoring within the same App Service plan until such a time the value of PaaS is fully realized (i.e., cloud-native), and the containerized application is no longer needed.

 

File Share Oriented Remediation

Applications often need to gain access to a file system for storage of documents of various types, so when moving to the cloud it is important to be able to maintain this capability in an application that is being migrated. Since there is no native access to SMB/NFS file shares in App Service at the moment, this becomes problematic for applications with this requirement. In this case, containerization is also recommended since as of current Azure File Shares are onlyfrom containerized applications (which should change in the future). This is one manner of remediation.

 

The other manner of remediation is to make the necessary code updates in an application to access the Azure File Share APIs. This is most practical that could run natively in App Service but would of course require more work than simply containerizing the application.

 

User Orchestration: Single Container vs. Multi-Container

This discussion will focus on deployment to App Service in what we will call the user orchestration path. As opposed to orchestration by a system such as Kubernetes, instead it is the user initiating orchestration manually as opposed to expecting the system to relieve much of that burden. Of course, there are constructs in App Service that handle what are generally considered orchestration steps such as scale out, and to some degree deployment slots that allow for fast rollouts and rollbacks that are still not as sophisticated as that of an orchestrator.

 

Now when migrating on-premises applications to Azure, customers have the option to containerize apps prior to migration, particularly those that won’t migrate directly into the standard multi-tenant App Service. Another reason customers containerize apps is because they’re pursuing a microservices strategy and want to begin the process of containerization with an eye towards breaking complex, containerized apps into smaller, composable services. In this article, we will look at single container vs. multi-container scenarios in what I will call “user orchestrator” scenarios (Azure Container Instances (ACI) or App Service Web App for Containers) and look at cases where you may need to step up to a Kubernetes orchestrator (specifically, Kubernetes with Azure Kubernetes Service).

 

User orchestrator single-container scenarios are generally due to applications that are self-contained (such as a nightly scheduled background jobs) and don’t require any scale out features.  For example, these might be .NET Framework console apps with GAC dependencies or that make calls to COM/COM+ components. These types of apps can be containerized on-premises with Docker and deployed either into ACI or App Service Web App for Containers. If you do not need to scale up or scale out your container, then ACI is the best candidate since it does not provide either scale up or scale out of the box (however, an ACI container may be redeployed to increase CPU or memory). If you do need auto scale capability, then Web App for Containers is the better choice.

 

Even though Web App for Containers provides scale up and scale out capability, the general design is that any apps deployed into a single Web App plan will all scale together and there will be the same number of instances of each web app within the plan. For example, you have containerized an app that has a front-end and web APIs API1, API2, and API3. By default, as you scale out from one to additional instances, you will have an additional instance for each of these web apps. In other words, if you scale the App Service plan up to three instances, you will have three front-end web apps, three instances of API1, three instances of API2, and three instances of API3. This may not be optimal as you may only require, for example, two instances of API1 and API2, and one instance of API3.

 

For general App Services scaling considerations, you can find them here. However, you should know that App Service does allow for lower level per-app scaling, so you can scale an app independently of the App Service plan, but you will have to perform this manually. Alternatively, you could place each app that needs to scale with the same number of instances in different App Service plans. In the case of App Service and App Service plans, effectively you are the “orchestrator” with respect to the ability to independently scale apps. This functionality is a basic capability of a Kubernetes orchestrator.

 

With respect to multi-container scenarios, ACI and Web App for Containers are possible choices in user orchestrator scenarios. There are some distinct differences, however, that must be considered. Docker containers essentially map to pods in Kubernetes. Most often, a pod consists of either a single container or multiple containers with a primary container and tightly coupled secondary, supporting containers. For example, an application container might have a supporting or “sidecar” container that performs functions such as logging for the application container or monitoring the application container. These containers act as a unit and are not intended to operate independently.

 

In ACI, the equivalent of a Kubernetes pod is a container group, which will have one or more containers in the group. Docker Compose allows you to specify a multi-container group that can be deployed into ACI. Two independent containers can be deployed in the group, but they will not have the ability to, again, scale up or out. Generally, however, we do not recommend this other than as a temporary rehost that will eventually be refactored to access a PaaS database service.

 

To scale up or out, you would need Web App for Containers instead of ACI. The WordPress container could scale independently of the backend MySQL container since you wouldn’t want two MySQL backends, but as discussed earlier, once deployed that would require per-app scaling within the same App Service plan to achieve multiple front-end WordPress instances with a single backend instance.  Of course, you could redeploy the MySQL database in its own App Service plan and then scale the load balanced WordPress container in the original plan. Again, we do not recommend backend database services in containers, but would instead recommend migrating the backend database to a PaaS database service.

 

Rollback

For App Service, there is no notion of rolling a deployment back, but it does provide multiple “deployment slots” in Standard and above App Service plans. Deployment slot functionality allows you to deploy your app to a staging slot which can then be which can be used to validate app changes before swapping the deployment into the default production slot. After the swap, the previous production deployment has now been swapped into the staging slot. If there are any problems with the current production deployment, the old production app can be swapped again into the production slot. There is only one production slot, but there can be up to twenty staging slots in any App Service plan depending on the plan tier. In the case of Kubernetes, an updated deployment will replace the previous deployment, with a rolling update as the default deployment model. To rollback, Kubernetes can go back to the previous deployment with a single command.

 

Generally, we recommend using three slots for your App Service production App Services Plan as follows: Production, Staging, and ‘last-known-good’ slot. Swap Production with Staging, and then swap staging with the ‘last-known-good' slot. Now you have an exact version of production in the ‘last-known-good' slot in case you want to roll back. This best practice is explained at the Microsoft Azure Architecture Center website under the “Deployment” section: Basic web application - Azure Reference Architectures | Microsoft Docs.

 

Self-healing

App Service has the ability to auto-heal applications leveraging App Service diagnostics, but this has to be configured by the user through the setting of rules “request count, slow request, memory limit, and HTTP status code to trigger mitigation actions.” There is also a proactive healing version of auto-healing for Windows only workloads that is turned on automatically with the ability to opt out.

 

Declarative vs. Imperative

In a PaaS service such as App Service, all actions are imperative, in that to get a deployment to a specific state, a user must take a specific action to direct the system to that state. In the declarative case, the user tells (declares to) the system its desired state through a specification, and then trusts the system to take that desired specification and do everything it can get to that desired state. An orchestrator, such as Kubernetes, while it may accept imperative commands, typically accepts a declarative specification (manifest) and makes it so with no further intervention from the user.

 

Load Balancing and Protecting Your Apps

If you simply want to load balance your application, with global failover to another region, the standard method for some time has been to use the standard layer 4 Azure Load Balancer with Traffic Manager, the DNS-based traffic load balancer. If you need additional features such as SSL offload, application-layer processing, or performance acceleration, then you will want Azure Front Door. Application Gateway provides similar features to Azure Front Door, except for performance acceleration. While both Front Door and Application Gateway are layer 7 (HTTP/HTTPS) load balancers, the primary difference is that Azure Front Door is a global service whereas Application Gateway is a regional service. And while Azure Front Door can load balance between your different scale units/clusters/stamp units across regions, Application Gateway allows you to load balance between your VMs/containers, etc. that is within the scale unit.

 

Below are further comparisons of Application Gateway to Azure Front Door:

 

  • Azure Front Door can perform path-based load balancing only at the global level but if one wants to load balance traffic even further within their virtual network (VNet) then they should use Application Gateway.
  • Azure Front Door doesn't work at a VM/container level, so it cannot do connection draining. However, Application Gateway allows you to do connection draining.
  • Application Gateway can listen on an internal and public endpoints. Azure Front Door can listen only on public endpoints.
  • Azure Front Door is richer for web apps exposed publicly as it has automatic integration with CDN’s for static content caching performance
  • Azure Front Door and Application Gateway both support session affinity. While Front Door can direct subsequent traffic from a user session to the same cluster or backend within a region, Application Gateway can direct affinitize the traffic to the same server within the cluster.
  • For Application Gateway, Health probes are used to check the backend health and take the servers out of rotation when they are unhealthy.
    However, in AFD, heath probes are not only used for tracking the health of the backend and taking the unhealthy servers out of rotation but also to route the traffic to the server based on latency, priority and weights.
  • Unlike Application Gateway, you cannot configure custom probe status on Azure Front Door. Only responses with 200 OK will be accepted.
  • The Azure Web Application Firewall (WAF) provides centralized protection of your web applications from common exploits and vulnerabilities like SQL injection and cross-site scripting are among the most common attacks. WAF coupled with either Application Gateway or AFD stops denial-of-service and targeted application attacks at the Azure network edge, close to attack sources before they enter your virtual network.

Below are some of our recommended best practices:

 

  • Don’t rely on your web application to handle SQL Injection/Cross-site scripting, etc. Leverage WAF with Application Gateway or Azure Front Door.
  • Integrate Application Gateway with Key Vault to store Application Gateway certificates in Key Vault. You can also directly upload certificate to Application Gateway, but it's recommended to keep/centralize the certificates in Key Vault and refer from Application Gateway.
  • Deploy Application Gateway across multiple Availability Zones if the rest of the solution is also spread across multiple Availability Zones. Now you can deploy Application Gateway v2 across multiple Availability Zones and can also turn on autoscaling.
  • Enable WAF in detection mode to ensure that the WAF doesn't block requests and then once you’re confident there are no false positives, enable prevention mode.

In some scenarios, it could also make sense to use both Azure Front Door and Application Gateway for an application. You could use Azure Front Door to globally load balance application traffic and then use Application Gateway to provide fine-tuned load balancing within a region. It is important to understand the application requirement and then select the right load balancing services. You can consult our decision tree for load balancing options here. There is also a great video you can view here: Picking the right Azure Load Balancing Solution - YouTube.

 

Monitoring

Below is a conceptual architecture of monitoring to assist in understanding how the many components work together.

 

walterm_0-1635551587876.png

 

So how does Azure Monitor work? Azure Monitor Documentation is a place to reference.

 

It all starts with collecting telemetry. Azure Monitor can collect data from Application, Network, Infrastructure and you can also ingest your own custom data. All the data is stored in centralized, fully managed logs and metrics stores. So, what can you do with all the data:

 

  • Typically, you start with insights which are end to end experiences we have put together for canonical scenarios or resources such as applications, containers, VMs, network, storage etc. Insights provide guidance and help troubleshoot and root cause issues quickly with a drill down experience.
  • You may in certain cases, just want to visualize the data. For that we provide Azure dashboards, Power BI integrations and a more native experience called Workbooks.
  • After visualizing the data, you may form some hypothesis and want to test them out. For that you need access to the raw data stores. For that we provide metrics explorer and a powerful big data platform called Log Analytics that is capable of querying petabytes of data within seconds.
  • If you want to be pro-active and take corrective actions, you can create alerts and runbooks to auto remedy an issue. Or if it’s a capacity issue, you can choose to scale-in or scale-out
  • Finally, we know that monitoring isn’t done is silos. Azure Monitor provides out of the box integration with popular ITSM and DevOps tools. You can again use APIs, Event Hubs, and Logic Apps to build custom integrations.

Application Insights

Application Insights, a feature of Azure Monitor, is an extensible Application Performance Management (APM) service for developers and DevOps professionals. Use it to monitor your live applications. It will automatically detect performance anomalies, and includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It's designed to help you continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, .NET Core, Node.js, Java, and Python hosted on-premises, hybrid, or any public cloud. It integrates with your DevOps process and has connection points to a variety of development tools. It can monitor and analyze telemetry from mobile apps by integrating with Visual Studio App Center.

 

Application Insights monitors:

 

  • Request rates, dependency rates, response times, and failure rates for pages and external services.
  • Exceptions - Both server and browser exceptions are reported.
  • Page views and load performance - reported by your users' browsers.
  • AJAX calls from web pages - rates, response times, and failure rates.
  • User and session counts.
  • Performance counters
  • Host diagnostics from Docker or Azure.
  • Diagnostic trace logs
  • Custom events and metrics that you write yourself in the client or server code, to track business events such as items sold or games won.

Log Analytics

Log Analytics is a tool in the Azure portal used to edit and run log queries with data in Azure Monitor Logs. You may write a simple query that returns a set of records and then use features of Log Analytics to sort, filter, and analyze them. Or you may write a more advanced query to perform statistical analysis and visualize the results in a chart to identify a particular trend. Whether you work with the results of your queries interactively or use them with other Azure Monitor features such as log query alerts or workbooks, Log Analytics is the tool that you're going to use write and test them.

 

Kusto Query Language

A Kusto query is a read-only request to process data and return results. The request is stated in plain text, using a data-flow model designed to make the syntax easy to read, author, and automate. The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns. Along with this Kusto Query Reference, if you have a SQL background, you will find the SQL to Kusto Query cheat sheet useful.

 

Networking Your App

Networking your applications can be challenging as there are so many options from connectivity and security perspectives. We will try to take some of the mystery out of the various networking options by presenting concepts and best practices as you are considering networking for your applications.

 

VNet Integration

VNet Integration is a feature that allows outbound connectivity from web applications to the selected subnet within the VNet. This allows the web application to access resources from within the VNet. If the VNet is further connected with an on-premises data center via express route or VPN connectivity, then access to those on-premises resources is also possible.

 

VNet Integration gives your web application access to resources in your virtual network but doesn't grant inbound private access to your web application from the virtual network. Private site access refers to making your app only accessible from a private network such as from within an Azure virtual network. VNet Integration is only for making outbound calls from your app into your VNet.

 

There are two forms of the VNet Integration feature:

 

  • Regional VNet Integration: When you connect to Azure Resource Manager virtual networks in the same region, you must have a dedicated subnet in the VNet you're integrating with.
  • Gateway-required VNet Integration: When you connect directly to VNet in other regions or to a classic virtual network in the same region, you need an Azure Virtual Network gateway provisioned in the target VNet.

Network Security Groups (NSGs)

When dealing with solutions integrating with VNETs, there may be cases where Network Security Group restrictions have been applied to your subnets, so if there are issues accessing applications that have been integrated into a VNet, it should be one of the first places you look to diagnose connectivity issues. Where NSGs are involved, it is important to review the inbound and outbound security rules to ensure the intended traffic filtering is in place. Do remember that currently when Private Link is used, NSG rules will not be evaluated (however, NSG and UDR support for private endpoints are in public preview on select regions). Please see the later section on Private Link and Private Endpoints.

 

Azure Firewall

Based on your solution requirements, all inbound traffic to the web application should go through Web Application Firewall enabled with either Azure Front Door or Application Gateway. However, there are scenarios where one needs to send outbound traffic from the web application. For such a scenario, Azure Firewall may be configured to route egress traffic. The web application will need to have VNet integration set up with the VNet that has the Azure Firewall deployed.

 

There may be a use case where one needs to share a dedicated static outbound IP for web applications hosted on App Service plans. When a web application is deployed on an App Service plan, the platform provides a list of outbound IPs associated with the web application that may get assigned. To advertise the web application via a dedicated static outbound IP, traffic can be routed via Azure Firewall, and then the assigned public IP of the firewall can be advertised as the outbound dedicated static IP. Of course, VNet integration will need to be enabled to the VNet that is hosting the Azure Firewall.

 

Data exfiltration is indeed a threat where unauthorized data transfer can occur, so do use Azure Firewall to protect against data exfiltration concerns. Azure Firewall can be leveraged as reverse proxy to restrict access to only authorized PaaS services for services where Private Link is not yet supported. Please do note that network controls alone are not sufficient to block data exfiltration, so further hardening with proper identity controls, key protections, and encryption is also needed.

 

Private Endpoints and Private Link

Private Endpoints can be used to disable all public access and thus secure your App Service web application when you want to access only from within the same VNet, other peered VNets, or from on-premises through a VPN or Express Route connection. A private endpoint is a network interface that uses a private IP address from your virtual network, effectively bringing the web application into your virtual network. The Private Endpoint for your web application will allow clients located in your private network to securely access the app over Private Link, which will be automatically created for you when you configure the Private Endpoint for your App Service web application. Private Endpoint is unidirectional and can be used only to secure inbound traffic. For restricting outbound traffic, refer to Azure Firewall or VNet Integration sections.

 

walterm_1-1635551587880.png

 

Using Private Endpoint for your web application enables you to:

 

  • Secure your web application by configuring the Private Endpoint, eliminating public exposure.
  • Securely connect to web application from on-premises networks that connect to the VNet using a VPN or ExpressRoute private peering.
  • Avoid any data exfiltration from your VNet.

Monitoring avenues to leverage:

Private Link for App Service web applications does have some limitations:

  • Private Link requires a premium SKU web application
  • Currently NSG’s do not apply to Private Link (NSG and UDR support for private endpoints are in public preview on select regions).
  • When Private Link is enabled the access restrictions on the web application are not evaluated.
  • Private Endpoint does not support FTP access to the web application.
  • Currently you cannot monitor traffic between the Private Endpoint and Private Link services. However, you can monitor the data before and after it arrives.

If you just need a secure connection between your VNet and your web application, a Service Endpoint is the simplest solution (explained in the next section). But if you also need to expose your app over a private IP or reach the web application from on-premises through an Azure Gateway, a regionally peered VNet, or a globally peered VNet, Private Endpoint is the best solution.

 

App Service Access Restrictions

App Service access restrictions are for the most part straightforward when it comes to blocking on a set of IPv4 or IPv6 address blocks, but just remember it is looking for CIDR blocks to establish the range of IP addresses to be restricted. You will need to add a restriction for each CIDR block.

 

With respect to the Virtual Network option, essentially what you are specifying is that you only want certain VNets to have access to your App Service application. This is also called a service endpoint-based rule, where you will have to configure a Microsoft.Web service endpoint on each of the subnets that you wish to access your App Service application. This will provide an optimized route over the Azure network backbone, allowing private IP addresses in your VNet to access your App Service web application without needing a public IP address.

 

A service tag is similar to a service endpoint, but in this case what you are specifying is that you only want certain Azure services, such as Application Gateway or Azure Front Door, to be able to access your App Service. For public internet-based App Services, you will most likely use this setting so your App Service web application is protected behind Application Gateway or Azure Front Door. A service tag represents a list of IP address prefixes, so the beauty of service tags is that as the address list changes you don’t have to worry about managing that IP address list. Microsoft will manage this list for specific Azure services that provide a service tag.

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2874401%22%20slang%3D%22en-US%22%3EConsiderations%20for%20Migrating%20.NET%20Applications%20to%20App%20Service%20or%20Azure%20Container%20Instances%20(ACI)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2874401%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20blog%20is%20for%20the%20purpose%20of%20sharing%20a%20few%20considerations%20from%20FastTrack%20for%20Azure%20engineers%20for%20customers%20migrating%20on-premises%20.NET%20applications%20to%20App%20Service%20or%20Azure%20Container%20Instances%20(ACI).%20This%20includes%20both%20non-container%20and%20container%20scenarios%20where%20a%20customer%20has%20evaluated%20various%20compute%20services%20for%20their%20applications%20and%20chosen%20the%20%E2%80%9Cnon-orchestrator%E2%80%9D%20App%20Service%20or%20ACI%20route%20instead%20of%20the%20orchestrator%20Azure%20Kubernetes%20Services%20(AKS)%20route.%20You%20can%20find%20our%20candidate%20service%20flowchart%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fguide%2Ftechnology-choices%2Fcompute-decision-tree%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20or%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcloud-adoption-framework%2Fready%2Fconsiderations%2Fcompute-options%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E%20(there%20is%20some%20overlap%20but%20also%20information%20presented%20in%20a%20different%20manner%20so%20both%20are%20highly%20useful).%20Because%20we%20describe%20this%20as%20the%20%E2%80%9Cnon-orchestrator%E2%80%9D%20route%20does%20not%20mean%20there%20will%20be%20no%20orchestration.%20In%20this%20sense%2C%20you%20will%20do%20much%20of%20the%20orchestration%20with%20the%20support%20of%20the%20tooling%2C%20making%20conscious%20decisions%20that%20an%20orchestrator%20would%20make%20on%20your%20behalf%20(with%20some%20configuration%2C%20of%20course).%20There%20will%20also%20be%20guidance%20in%20another%20post%20for%20the%20orchestrator%20route.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--321970990%22%20id%3D%22toc-hId--298017809%22%3ERationalization%20and%20Remediation%3C%2FH2%3E%0A%3CP%3EThe%20process%20of%20evaluating%20your%20applications%20to%20best%20determine%20how%20to%20migrate%20or%20modernize%20has%20a%20term%20called%20cloud%20rationalization.%20As%20you%20are%20making%20these%20decision%2C%20we%20suggest%20that%20you%20find%20out%20more%20about%20%E2%80%9Cthe%20five%20Rs%E2%80%9D%20of%20rationalization%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcloud-adoption-framework%2Fdigital-estate%2F5-rs-of-rationalization%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20where%20apps%20are%20simply%20rehosted%20in%20the%20cloud%20with%20no%20changes%20in%20virtual%20machines.%20At%20some%20later%20time%2C%20the%20app%20will%20be%20rearchitected%2Frefactored%20to%20take%20advantage%20of%20both%20the%20cost%20savings%20and%20greater%20interoperability%20of%20cloud-native%20services.%20There%20are%20also%20the%20cases%20where%20apps%20are%20candidates%20to%20be%20migrated%20directly%20into%20PaaS%20services%20with%20little%20more%20than%20configuration%20changes%2C%20such%20as%20a%20database%20connection.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20we%20think%20needs%20to%20be%20added%20to%20this%20vocabulary%20is%20the%20category%20of%20remediation%2C%20where%20customers%20don%E2%80%99t%20want%20a%20simple%20lift%20and%20shift%20but%20want%20to%20remediate%20existing%20apps%20to%20allow%20them%20to%20be%20rehosted%20in%20a%20PaaS%20service%20without%20taking%20advantage%20of%20PaaS%20services%20(some%20might%20still%20call%20this%20refactoring%2C%20but%20refactoring%20is%20more%20of%20a%20case%20of%20making%20changes%20to%20specifically%20take%20advantage%20of%20the%20PaaS%20model%20on%20a%20cloud%20platform).%20An%20example%20of%20this%20is%20migration%20of%20an%20ASP.NET%20Framework%20application%20that%20uses%20GAC%20assemblies%2C%20COM%2FCOM%2B%20components%20or%20uses%20port%20bindings%20other%20than%2080%2F443.%20None%20of%20these%20will%20migrate%20to%20App%20Service%20PaaS%20service%20because%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fmigration-checklist-when-moving-to-azure-app-service%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ethey%20are%20not%20supported%3C%2FA%3E%2C%20even%20though%20the%20first%20two%20could%20simply%20be%20containerized%20and%20migrated%20to%20App%20Service%20Web%20App%20for%20Containers%20as%20is%20(but%20that%20wouldn%E2%80%99t%20be%20PaaS%20in%20the%20sense%20of%20taking%20advantage%20of%20its%20specific%20capabilities).%20If%20the%20customer%20indeed%20wants%20to%20migrate%20to%20App%20Service%20PaaS%20services%2C%20then%20the%20apps%20must%20be%20remediated%2C%20which%20will%20take%20some%20work%2C%20but%20is%20far%20short%20of%20a%20complete%20re-architecture%2Frewrite.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-368590484%22%20id%3D%22toc-hId-392543665%22%3EContainerization%20as%20Remediation%3C%2FH3%3E%0A%3CP%3EContainerization%20as%20a%20means%20of%20remediating%20an%20application%20that%20needs%20to%20be%20migrated%20to%20Azure%20provides%20a%20number%20of%20benefits.%20The%20first%20is%20that%20the%20application%20can%20be%20moved%20%E2%80%9Cas%20is%E2%80%9D%20into%20Azure%2C%20immediately%20taking%20advantage%20of%20the%20PaaS%20platform%2C%20even%20though%20not%20fully.%20The%20existing%20Basic%2C%20Standard%2C%20and%20Premium%20App%20Service%20plans%20include%20container%20support%20for%20both%20Linux%20and%20Windows%20workloads%20at%20no%20additional%20cost.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEven%20though%20Web%20App%20for%20Containers%20is%20more%20costly%20than%20Virtual%20Machines%2C%20there%20is%20no%20worry%20of%20OS%20maintenance%2C%20and%20over%20time%20as%20the%20containerized%20applications%20are%20modernized%2C%20there%20can%20be%20a%20stepwise%20motion%20of%20refactoring%20within%20the%20same%20App%20Service%20plan%20until%20such%20a%20time%20the%20value%20of%20PaaS%20is%20fully%20realized%20(i.e.%2C%20cloud-native)%2C%20and%20the%20containerized%20application%20is%20no%20longer%20needed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1438863979%22%20id%3D%22toc-hId--1414910798%22%3EFile%20Share%20Oriented%20Remediation%3C%2FH3%3E%0A%3CP%3EApplications%20often%20need%20to%20gain%20access%20to%20a%20file%20system%20for%20storage%20of%20documents%20of%20various%20types%2C%20so%20when%20moving%20to%20the%20cloud%20it%20is%20important%20to%20be%20able%20to%20maintain%20this%20capability%20in%20an%20application%20that%20is%20being%20migrated.%20Since%20there%20is%20no%20native%20access%20to%20SMB%2FNFS%20file%20shares%20in%20App%20Service%20at%20the%20moment%2C%20this%20becomes%20problematic%20for%20applications%20with%20this%20requirement.%20In%20this%20case%2C%20containerization%20is%20also%20recommended%20since%20as%20of%20current%20Azure%20File%20Shares%20are%20onlyfrom%20containerized%20applications%20(which%20should%20change%20in%20the%20future).%20This%20is%20one%20manner%20of%20remediation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20other%20manner%20of%20remediation%20is%20to%20make%20the%20necessary%20code%20updates%20in%20an%20application%20to%20access%20the%20Azure%20File%20Share%20APIs.%20This%20is%20most%20practical%20that%20could%20run%20natively%20in%20App%20Service%20but%20would%20of%20course%20require%20more%20work%20than%20simply%20containerizing%20the%20application.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1449367083%22%20id%3D%22toc-hId--1425413902%22%3EUser%20Orchestration%3A%20Single%20Container%20vs.%20Multi-Container%3C%2FH2%3E%0A%3CP%3EThis%20discussion%20will%20focus%20on%20deployment%20to%20App%20Service%20in%20what%20we%20will%20call%20the%20user%20orchestration%20path.%20As%20opposed%20to%20orchestration%20by%20a%20system%20such%20as%20Kubernetes%2C%20instead%20it%20is%20the%20user%20initiating%20orchestration%20manually%20as%20opposed%20to%20expecting%20the%20system%20to%20relieve%20much%20of%20that%20burden.%20Of%20course%2C%20there%20are%20constructs%20in%20App%20Service%20that%20handle%20what%20are%20generally%20considered%20orchestration%20steps%20such%20as%20scale%20out%2C%20and%20to%20some%20degree%20deployment%20slots%20that%20allow%20for%20fast%20rollouts%20and%20rollbacks%20that%20are%20still%20not%20as%20sophisticated%20as%20that%20of%20an%20orchestrator.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20when%20migrating%20on-premises%20applications%20to%20Azure%2C%20customers%20have%20the%20option%20to%20containerize%20apps%20prior%20to%20migration%2C%20particularly%20those%20that%20won%E2%80%99t%20migrate%20directly%20into%20the%20standard%20multi-tenant%20App%20Service.%20Another%20reason%20customers%20containerize%20apps%20is%20because%20they%E2%80%99re%20pursuing%20a%20microservices%20strategy%20and%20want%20to%20begin%20the%20process%20of%20containerization%20with%20an%20eye%20towards%20breaking%20complex%2C%20containerized%20apps%20into%20smaller%2C%20composable%20services.%20In%20this%20article%2C%20we%20will%20look%20at%20single%20container%20vs.%20multi-container%20scenarios%20in%20what%20I%20will%20call%20%E2%80%9Cuser%20orchestrator%E2%80%9D%20scenarios%20(Azure%20Container%20Instances%20(ACI)%20or%20App%20Service%20Web%20App%20for%20Containers)%20and%20look%20at%20cases%20where%20you%20may%20need%20to%20step%20up%20to%20a%20Kubernetes%20orchestrator%20(specifically%2C%20Kubernetes%20with%20Azure%20Kubernetes%20Service).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUser%20orchestrator%20single-container%20scenarios%20are%20generally%20due%20to%20applications%20that%20are%20self-contained%20(such%20as%20a%20nightly%20scheduled%20background%20jobs)%20and%20don%E2%80%99t%20require%20any%20scale%20out%20features.%26nbsp%3B%20For%20example%2C%20these%20might%20be%20.NET%20Framework%20console%20apps%20with%20GAC%20dependencies%20or%20that%20make%20calls%20to%20COM%2FCOM%2B%20components.%20These%20types%20of%20apps%20can%20be%20containerized%20on-premises%20with%20Docker%20and%20deployed%20either%20into%20ACI%20or%20App%20Service%20Web%20App%20for%20Containers.%20If%20you%20do%20not%20need%20to%20scale%20up%20or%20scale%20out%20your%20container%2C%20then%20ACI%20is%20the%20best%20candidate%20since%20it%20does%20not%20provide%20either%20scale%20up%20or%20scale%20out%20of%20the%20box%20(however%2C%20an%20ACI%20container%20may%20be%20redeployed%20to%20increase%20CPU%20or%20memory).%20If%20you%20do%20need%20auto%20scale%20capability%2C%20then%20Web%20App%20for%20Containers%20is%20the%20better%20choice.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEven%20though%20Web%20App%20for%20Containers%20provides%20scale%20up%20and%20scale%20out%20capability%2C%20the%20general%20design%20is%20that%20any%20apps%20deployed%20into%20a%20single%20Web%20App%20plan%20will%20all%20scale%20together%20and%20there%20will%20be%20the%20same%20number%20of%20instances%20of%20each%20web%20app%20within%20the%20plan.%20For%20example%2C%20you%20have%20containerized%20an%20app%20that%20has%20a%20front-end%20and%20web%20APIs%20API1%2C%20API2%2C%20and%20API3.%20By%20default%2C%20as%20you%20scale%20out%20from%20one%20to%20additional%20instances%2C%20you%20will%20have%20an%20additional%20instance%20for%20%3CEM%3Eeach%3C%2FEM%3E%20of%20these%20web%20apps.%20In%20other%20words%2C%20if%20you%20scale%20the%20App%20Service%20plan%20up%20to%20three%20instances%2C%20you%20will%20have%20three%20front-end%20web%20apps%2C%20three%20instances%20of%20API1%2C%20three%20instances%20of%20API2%2C%20and%20three%20instances%20of%20API3.%20This%20may%20not%20be%20optimal%20as%20you%20may%20only%20require%2C%20for%20example%2C%20two%20instances%20of%20API1%20and%20API2%2C%20and%20one%20instance%20of%20API3.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20general%20App%20Services%20scaling%20considerations%2C%20you%20can%20find%20them%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Freference-architectures%2Fapp-service-web-app%2Fbasic-web-app%3Ftabs%3Dcli%23scalability-considerations%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20However%2C%20you%20should%20know%20that%20App%20Service%20does%20allow%20for%20lower%20level%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fmanage-scale-per-app%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eper-app%20scaling%3C%2FA%3E%2C%20so%20you%20can%20scale%20an%20app%20independently%20of%20the%20App%20Service%20plan%2C%20but%20you%20will%20have%20to%20perform%20this%20manually.%20Alternatively%2C%20you%20could%20place%20each%20app%20that%20needs%20to%20scale%20with%20the%20same%20number%20of%20instances%20in%20different%20App%20Service%20plans.%20In%20the%20case%20of%20App%20Service%20and%20App%20Service%20plans%2C%20effectively%20%3CEM%3Eyou%3C%2FEM%3E%20are%20the%20%E2%80%9Corchestrator%E2%80%9D%20with%20respect%20to%20the%20ability%20to%20independently%20scale%20apps.%20This%20functionality%20is%20a%20basic%20capability%20of%20a%20Kubernetes%20orchestrator.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20respect%20to%20multi-container%20scenarios%2C%20ACI%20and%20Web%20App%20for%20Containers%20are%20possible%20choices%20in%20user%20orchestrator%20scenarios.%20There%20are%20some%20distinct%20differences%2C%20however%2C%20that%20must%20be%20considered.%20Docker%20containers%20essentially%20map%20to%20%3CA%20href%3D%22https%3A%2F%2Fkubernetes.io%2Fdocs%2Fconcepts%2Fworkloads%2Fpods%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Epods%3C%2FA%3E%20in%20Kubernetes.%20Most%20often%2C%20a%20pod%20consists%20of%20either%20a%20single%20container%20or%20multiple%20containers%20with%20a%20primary%20container%20and%20tightly%20coupled%20secondary%2C%20supporting%20containers.%20For%20example%2C%20an%20application%20container%20might%20have%20a%20supporting%20or%20%E2%80%9Csidecar%E2%80%9D%20container%20that%20performs%20functions%20such%20as%20logging%20for%20the%20application%20container%20or%20monitoring%20the%20application%20container.%20These%20containers%20act%20as%20a%20unit%20and%20are%20not%20intended%20to%20operate%20independently.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20ACI%2C%20the%20equivalent%20of%20a%20Kubernetes%20pod%20is%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcontainer-instances%2Fcontainer-instances-container-groups%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Econtainer%20group%3C%2FA%3E%2C%20which%20will%20have%20one%20or%20more%20containers%20in%20the%20group.%20Docker%20Compose%20allows%20you%20to%20specify%20a%20multi-container%20group%20that%20can%20be%20deployed%20into%20ACI.%20Two%20independent%20containers%20can%20be%20deployed%20in%20the%20group%2C%20but%20they%20will%20not%20have%20the%20ability%20to%2C%20again%2C%20scale%20up%20or%20out.%20Generally%2C%20however%2C%20we%20do%20not%20recommend%20this%20other%20than%20as%20a%20temporary%20rehost%20that%20will%20eventually%20be%20refactored%20to%20access%20a%20PaaS%20database%20service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20scale%20up%20or%20out%2C%20you%20would%20need%20Web%20App%20for%20Containers%20instead%20of%20ACI.%20The%20WordPress%20container%20could%20scale%20independently%20of%20the%20backend%20MySQL%20container%20since%20you%20wouldn%E2%80%99t%20want%20two%20MySQL%20backends%2C%20but%20as%20discussed%20earlier%2C%20once%20deployed%20that%20would%20require%20per-app%20scaling%20within%20the%20same%20App%20Service%20plan%20to%20achieve%20multiple%20front-end%20WordPress%20instances%20with%20a%20single%20backend%20instance.%26nbsp%3B%20Of%20course%2C%20you%20could%20redeploy%20the%20MySQL%20database%20in%20its%20own%20App%20Service%20plan%20and%20then%20scale%20the%20load%20balanced%20WordPress%20container%20in%20the%20original%20plan.%20Again%2C%20we%20do%20not%20recommend%20backend%20database%20services%20in%20containers%2C%20but%20would%20instead%20recommend%20migrating%20the%20backend%20database%20to%20a%20PaaS%20database%20service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--758805609%22%20id%3D%22toc-hId--734852428%22%3ERollback%3C%2FH3%3E%0A%3CP%3EFor%20App%20Service%2C%20there%20is%20no%20notion%20of%20rolling%20a%20deployment%20back%2C%20but%20it%20does%20provide%20multiple%20%E2%80%9Cdeployment%20slots%E2%80%9D%20in%20Standard%20and%20above%20App%20Service%20plans.%20Deployment%20slot%20functionality%20allows%20you%20to%20deploy%20your%20app%20to%20a%20staging%20slot%20which%20can%20then%20be%20which%20can%20be%20used%20to%20validate%20app%20changes%20before%20swapping%20the%20deployment%20into%20the%20default%20production%20slot.%20After%20the%20swap%2C%20the%20previous%20production%20deployment%20has%20now%20been%20swapped%20into%20the%20staging%20slot.%20If%20there%20are%20any%20problems%20with%20the%20current%20production%20deployment%2C%20the%20old%20production%20app%20can%20be%20swapped%20again%20into%20the%20production%20slot.%20There%20is%20only%20one%20production%20slot%2C%20but%20there%20can%20be%20up%20to%20twenty%20staging%20slots%20in%20any%20App%20Service%20plan%20depending%20on%20the%20plan%20tier.%20In%20the%20case%20of%20Kubernetes%2C%20an%20updated%20deployment%20will%20replace%20the%20previous%20deployment%2C%20with%20a%20rolling%20update%20as%20the%20default%20deployment%20model.%20To%20rollback%2C%20Kubernetes%20can%20go%20back%20to%20the%20previous%20deployment%20with%20a%20single%20command.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGenerally%2C%20we%20recommend%20using%20three%20slots%20for%20your%20App%20Service%20production%20App%20Services%20Plan%20as%20follows%3A%20Production%2C%20Staging%2C%20and%20%E2%80%98last-known-good%E2%80%99%20slot.%20Swap%20Production%20with%20Staging%2C%20and%20then%20swap%20staging%20with%20the%20%E2%80%98last-known-good'%20slot.%20Now%20you%20have%20an%20exact%20version%20of%20production%20in%20the%20%E2%80%98last-known-good'%20slot%20in%20case%20you%20want%20to%20roll%20back.%20This%20best%20practice%20is%20explained%20at%20the%20Microsoft%20Azure%20Architecture%20Center%20website%20under%20the%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Freference-architectures%2Fapp-service-web-app%2Fbasic-web-app%3Ftabs%3Dcli%23deploymenthttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Freference-architectures%2Fapp-service-web-app%2Fbasic-web-app%3Ftabs%3Dcli%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDeployment%3C%2FA%3E%E2%80%9D%20section%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Freference-architectures%2Fapp-service-web-app%2Fbasic-web-app%3Ftabs%3Dcli%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBasic%20web%20application%20-%20Azure%20Reference%20Architectures%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1728707224%22%20id%3D%22toc-hId-1752660405%22%3ESelf-healing%3C%2FH3%3E%0A%3CP%3EApp%20Service%20has%20the%20ability%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-diagnostics%23auto-healing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eauto-heal%3C%2FA%3E%20applications%20leveraging%20App%20Service%20diagnostics%2C%20but%20this%20has%20to%20be%20configured%20by%20the%20user%20through%20the%20setting%20of%20rules%20%E2%80%9Crequest%20count%2C%20slow%20request%2C%20memory%20limit%2C%20and%20HTTP%20status%20code%20to%20trigger%20mitigation%20actions.%E2%80%9D%20There%20is%20also%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-diagnostics%23proactive-auto-healing-only-for-windows-app%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eproactive%20healing%3C%2FA%3E%20version%20of%20auto-healing%20for%20Windows%20only%20workloads%20that%20is%20turned%20on%20automatically%20with%20the%20ability%20to%20opt%20out.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--78747239%22%20id%3D%22toc-hId--54794058%22%3EDeclarative%20vs.%20Imperative%3C%2FH3%3E%0A%3CP%3EIn%20a%20PaaS%20service%20such%20as%20App%20Service%2C%20all%20actions%20are%20imperative%2C%20in%20that%20to%20get%20a%20deployment%20to%20a%20specific%20state%2C%20a%20user%20must%20take%20a%20specific%20action%20to%20direct%20the%20system%20to%20that%20state.%20In%20the%20declarative%20case%2C%20the%20user%20tells%20(declares%20to)%20the%20system%20its%20desired%20state%20through%20a%20specification%2C%20and%20then%20trusts%20the%20system%20to%20take%20that%20desired%20specification%20and%20do%20everything%20it%20can%20get%20to%20that%20desired%20state.%20An%20orchestrator%2C%20such%20as%20Kubernetes%2C%20while%20it%20may%20accept%20imperative%20commands%2C%20typically%20accepts%20a%20declarative%20specification%20(manifest)%20and%20makes%20it%20so%20with%20no%20further%20intervention%20from%20the%20user.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--89250343%22%20id%3D%22toc-hId--65297162%22%3ELoad%20Balancing%20and%20Protecting%20Your%20Apps%3C%2FH2%3E%0A%3CP%3EIf%20you%20simply%20want%20to%20load%20balance%20your%20application%2C%20with%20global%20failover%20to%20another%20region%2C%20the%20standard%20method%20for%20some%20time%20has%20been%20to%20use%20the%20standard%20layer%204%20Azure%20Load%20Balancer%20with%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Ftraffic-manager%2Ftraffic-manager-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETraffic%20Manager%3C%2FA%3E%2C%20the%20DNS-based%20traffic%20load%20balancer.%20If%20you%20need%20additional%20features%20such%20as%20SSL%20offload%2C%20application-layer%20processing%2C%20or%20performance%20acceleration%2C%20then%20you%20will%20want%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Ffrontdoor%2Ffront-door-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Front%20Door%3C%2FA%3E.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapplication-gateway%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApplication%20Gateway%3C%2FA%3E%20provides%20similar%20features%20to%20Azure%20Front%20Door%2C%20except%20for%20performance%20acceleration.%20While%20both%20Front%20Door%20and%20Application%20Gateway%20are%20layer%207%20(HTTP%2FHTTPS)%20load%20balancers%2C%20the%20primary%20difference%20is%20that%20Azure%20Front%20Door%20is%20a%20global%20service%20whereas%20Application%20Gateway%20is%20a%20regional%20service.%20And%20while%20Azure%20Front%20Door%20can%20load%20balance%20between%20your%20different%20scale%20units%2Fclusters%2Fstamp%20units%20across%20regions%2C%20Application%20Gateway%20allows%20you%20to%20load%20balance%20between%20your%20VMs%2Fcontainers%2C%20etc.%20that%20is%20within%20the%20scale%20unit.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBelow%20are%20further%20comparisons%20of%20Application%20Gateway%20to%20Azure%20Front%20Door%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAzure%20Front%20Door%20can%20perform%20path-based%20load%20balancing%20only%20at%20the%20global%20level%20but%20if%20one%20wants%20to%20load%20balance%20traffic%20even%20further%20within%20their%20virtual%20network%20(VNet)%20then%20they%20should%20use%20Application%20Gateway.%3C%2FLI%3E%0A%3CLI%3EAzure%20Front%20Door%20doesn't%20work%20at%20a%20VM%2Fcontainer%20level%2C%20so%20it%20cannot%20do%20connection%20draining.%20However%2C%20Application%20Gateway%20allows%20you%20to%20do%20connection%20draining.%3C%2FLI%3E%0A%3CLI%3EApplication%20Gateway%20can%20listen%20on%20an%20internal%20and%20public%20endpoints.%20Azure%20Front%20Door%20can%20listen%20only%20on%20public%20endpoints.%3C%2FLI%3E%0A%3CLI%3EAzure%20Front%20Door%20is%20richer%20for%20web%20apps%20exposed%20publicly%20as%20it%20has%20automatic%20integration%20with%20CDN%E2%80%99s%20for%20static%20content%20caching%20performance%3C%2FLI%3E%0A%3CLI%3EAzure%20Front%20Door%20and%20Application%20Gateway%20both%20support%20session%20affinity.%20While%20Front%20Door%20can%20direct%20subsequent%20traffic%20from%20a%20user%20session%20to%20the%20same%20cluster%20or%20backend%20within%20a%20region%2C%20Application%20Gateway%20can%20direct%20affinitize%20the%20traffic%20to%20the%20same%20server%20within%20the%20cluster.%3C%2FLI%3E%0A%3CLI%3EFor%20Application%20Gateway%2C%20Health%20probes%20are%20used%20to%20check%20the%20backend%20health%20and%20take%20the%20servers%20out%20of%20rotation%20when%20they%20are%20unhealthy.%3CBR%20%2F%3EHowever%2C%20in%20AFD%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Ffrontdoor%2Ffront-door-health-probes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eheath%20probes%3C%2FA%3E%20are%20not%20only%20used%20for%20tracking%20the%20health%20of%20the%20backend%20and%20taking%20the%20unhealthy%20servers%20out%20of%20rotation%20but%20also%20to%20route%20the%20traffic%20to%20the%20server%20based%20on%20latency%2C%20priority%20and%20weights.%3C%2FLI%3E%0A%3CLI%3EUnlike%20Application%20Gateway%2C%20you%20cannot%20configure%20custom%20probe%20status%20on%20Azure%20Front%20Door.%20Only%20responses%20with%20200%20OK%20will%20be%20accepted.%3C%2FLI%3E%0A%3CLI%3EThe%20Azure%20Web%20Application%20Firewall%20(WAF)%20provides%20centralized%20protection%20of%20your%20web%20applications%20from%20common%20exploits%20and%20vulnerabilities%20like%20SQL%20injection%20and%20cross-site%20scripting%20are%20among%20the%20most%20common%20attacks.%20WAF%20coupled%20with%20either%20Application%20Gateway%20or%20AFD%20stops%20denial-of-service%20and%20targeted%20application%20attacks%20at%20the%20Azure%20network%20edge%2C%20close%20to%20attack%20sources%20before%20they%20enter%20your%20virtual%20network.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBelow%20are%20some%20of%20our%20recommended%20best%20practices%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EDon%E2%80%99t%20rely%20on%20your%20web%20application%20to%20handle%20SQL%20Injection%2FCross-site%20scripting%2C%20etc.%20Leverage%20WAF%20with%20Application%20Gateway%20or%20Azure%20Front%20Door.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapplication-gateway%2Fkey-vault-certs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntegrate%20Application%20Gateway%20with%20Key%20Vault%3C%2FA%3E%20to%20store%20Application%20Gateway%20certificates%20in%20Key%20Vault.%20You%20can%20also%20directly%20upload%20certificate%20to%20Application%20Gateway%2C%20but%20it's%20recommended%20to%20keep%2Fcentralize%20the%20certificates%20in%20Key%20Vault%20and%20refer%20from%20Application%20Gateway.%3C%2FLI%3E%0A%3CLI%3EDeploy%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapplication-gateway%2Fapplication-gateway-autoscaling-zone-redundant%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApplication%20Gateway%20across%20multiple%20Availability%20Z%3C%2FA%3E%3CSPAN%3Eones%3C%2FSPAN%3E%20if%20the%20rest%20of%20the%20solution%20is%20also%20spread%20across%20multiple%20Availability%20Zones.%20Now%20you%20can%20deploy%20Application%20Gateway%20v2%20across%20multiple%20Availability%20Zones%20and%20can%20also%20turn%20on%20autoscaling.%3C%2FLI%3E%0A%3CLI%3EEnable%20WAF%20in%20detection%20mode%20to%20ensure%20that%20the%20WAF%20doesn't%20block%20requests%20and%20then%20once%20you%E2%80%99re%20confident%20there%20are%20no%20false%20positives%2C%20enable%20prevention%20mode.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20some%20scenarios%2C%20it%20could%20also%20make%20sense%20to%20use%20both%20Azure%20Front%20Door%20and%20Application%20Gateway%20for%20an%20application.%20You%20could%20use%20Azure%20Front%20Door%20to%20globally%20load%20balance%20application%20traffic%20and%20then%20use%20Application%20Gateway%20to%20provide%20fine-tuned%20load%20balancing%20within%20a%20region.%20It%20is%20important%20to%20understand%20the%20application%20requirement%20and%20then%20select%20the%20right%20load%20balancing%20services.%20You%20can%20consult%20our%20decision%20tree%20for%20load%20balancing%20options%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fguide%2Ftechnology-choices%2Fload-balancing-overview%23decision-tree-for-load-balancing-in-azure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20There%20is%20also%20a%20great%20video%20you%20can%20view%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ds1H2HpSJ-cg%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPicking%20the%20right%20Azure%20Load%20Balancing%20Solution%20-%20YouTube%3C%2FA%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1896704806%22%20id%3D%22toc-hId--1872751625%22%3EMonitoring%3C%2FH2%3E%0A%3CP%3EBelow%20is%20a%20conceptual%20architecture%20of%20monitoring%20to%20assist%20in%20understanding%20how%20the%20many%20components%20work%20together.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22walterm_0-1635551587876.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F321718iE1A0507072343D59%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22walterm_0-1635551587876.png%22%20alt%3D%22walterm_0-1635551587876.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20how%20does%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Monitor%3C%2FA%3E%20work%3F%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Monitor%20Documentation%3C%2FA%3E%20is%20a%20place%20to%20reference.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20all%20starts%20with%20collecting%20telemetry.%20Azure%20Monitor%20can%20collect%20data%20from%20Application%2C%20Network%2C%20Infrastructure%20and%20you%20can%20also%20ingest%20your%20own%20custom%20data.%20All%20the%20data%20is%20stored%20in%20centralized%2C%20fully%20managed%20logs%20and%20metrics%20stores.%20So%2C%20what%20can%20you%20do%20with%20all%20the%20data%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ETypically%2C%20you%20start%20with%20insights%20which%20are%20end%20to%20end%20experiences%20we%20have%20put%20together%20for%20canonical%20scenarios%20or%20resources%20such%20as%20applications%2C%20containers%2C%20VMs%2C%20network%2C%20storage%20etc.%20Insights%20provide%20guidance%20and%20help%20troubleshoot%20and%20root%20cause%20issues%20quickly%20with%20a%20drill%20down%20experience.%3C%2FLI%3E%0A%3CLI%3EYou%20may%20in%20certain%20cases%2C%20just%20want%20to%20visualize%20the%20data.%20For%20that%20we%20provide%20Azure%20dashboards%2C%20Power%20BI%20integrations%20and%20a%20more%20native%20experience%20called%20Workbooks.%3C%2FLI%3E%0A%3CLI%3EAfter%20visualizing%20the%20data%2C%20you%20may%20form%20some%20hypothesis%20and%20want%20to%20test%20them%20out.%20For%20that%20you%20need%20access%20to%20the%20raw%20data%20stores.%20For%20that%20we%20provide%20metrics%20explorer%20and%20a%20powerful%20big%20data%20platform%20called%20Log%20Analytics%20that%20is%20capable%20of%20querying%20petabytes%20of%20data%20within%20seconds.%3C%2FLI%3E%0A%3CLI%3EIf%20you%20want%20to%20be%20pro-active%20and%20take%20corrective%20actions%2C%20you%20can%20create%20alerts%20and%20runbooks%20to%20auto%20remedy%20an%20issue.%20Or%20if%20it%E2%80%99s%20a%20capacity%20issue%2C%20you%20can%20choose%20to%20scale-in%20or%20scale-out%3C%2FLI%3E%0A%3CLI%3EFinally%2C%20we%20know%20that%20monitoring%20isn%E2%80%99t%20done%20is%20silos.%20Azure%20Monitor%20provides%20out%20of%20the%20box%20integration%20with%20popular%20ITSM%20and%20DevOps%20tools.%20You%20can%20again%20use%20APIs%2C%20Event%20Hubs%2C%20and%20Logic%20Apps%20to%20build%20custom%20integrations.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId--1206143332%22%20id%3D%22toc-hId--1182190151%22%3EApplication%20Insights%3C%2FH3%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Fapp-insights-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApplication%20Insights%3C%2FA%3E%2C%20a%20feature%20of%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Monitor%3C%2FA%3E%2C%20is%20an%20extensible%20Application%20Performance%20Management%20(APM)%20service%20for%20developers%20and%20DevOps%20professionals.%20Use%20it%20to%20monitor%20your%20live%20applications.%20It%20will%20automatically%20detect%20performance%20anomalies%2C%20and%20includes%20powerful%20analytics%20tools%20to%20help%20you%20diagnose%20issues%20and%20to%20understand%20what%20users%20actually%20do%20with%20your%20app.%20It's%20designed%20to%20help%20you%20continuously%20improve%20performance%20and%20usability.%20It%20works%20for%20apps%20on%20a%20wide%20variety%20of%20platforms%20including%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Fasp-net%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E.NET%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Fasp-net-core%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E.NET%20Core%3C%2FA%3E%2C%20Node.js%2C%20Java%2C%20and%20Python%20hosted%20on-premises%2C%20hybrid%2C%20or%20any%20public%20cloud.%20It%20integrates%20with%20your%20DevOps%20process%20and%20has%20connection%20points%20to%20a%20variety%20of%20development%20tools.%20It%20can%20monitor%20and%20analyze%20telemetry%20from%20mobile%20apps%20by%20integrating%20with%20Visual%20Studio%20App%20Center.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EApplication%20Insights%20monitors%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERequest%20rates%2C%20dependency%20rates%2C%20response%20times%2C%20and%20failure%20rates%20for%20pages%20and%20external%20services.%3C%2FLI%3E%0A%3CLI%3EExceptions%20-%20Both%20server%20and%20browser%20exceptions%20are%20reported.%3C%2FLI%3E%0A%3CLI%3EPage%20views%20and%20load%20performance%20-%20reported%20by%20your%20users'%20browsers.%3C%2FLI%3E%0A%3CLI%3EAJAX%20calls%20from%20web%20pages%20-%20rates%2C%20response%20times%2C%20and%20failure%20rates.%3C%2FLI%3E%0A%3CLI%3EUser%20and%20session%20counts.%3C%2FLI%3E%0A%3CLI%3EPerformance%20counters%3C%2FLI%3E%0A%3CLI%3EHost%20diagnostics%20from%20Docker%20or%20Azure.%3C%2FLI%3E%0A%3CLI%3EDiagnostic%20trace%20logs%3C%2FLI%3E%0A%3CLI%3ECustom%20events%20and%20metrics%20that%20you%20write%20yourself%20in%20the%20client%20or%20server%20code%2C%20to%20track%20business%20events%20such%20as%20items%20sold%20or%20games%20won.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-586206022%22%20id%3D%22toc-hId-610159203%22%3ELog%20Analytics%3C%2FH3%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flogs%2Flog-analytics-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ELog%20Analytics%3C%2FA%3E%20is%20a%20tool%20in%20the%20Azure%20portal%20used%20to%20edit%20and%20run%20log%20queries%20with%20data%20in%20Azure%20Monitor%20Logs.%20You%20may%20write%20a%20simple%20query%20that%20returns%20a%20set%20of%20records%20and%20then%20use%20features%20of%20Log%20Analytics%20to%20sort%2C%20filter%2C%20and%20analyze%20them.%20Or%20you%20may%20write%20a%20more%20advanced%20query%20to%20perform%20statistical%20analysis%20and%20visualize%20the%20results%20in%20a%20chart%20to%20identify%20a%20particular%20trend.%20Whether%20you%20work%20with%20the%20results%20of%20your%20queries%20interactively%20or%20use%20them%20with%20other%20Azure%20Monitor%20features%20such%20as%20log%20query%20alerts%20or%20workbooks%2C%20Log%20Analytics%20is%20the%20tool%20that%20you're%20going%20to%20use%20write%20and%20test%20them.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1221248441%22%20id%3D%22toc-hId--1197295260%22%3EKusto%20Query%20Language%3C%2FH3%3E%0A%3CP%3EA%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fquery%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EKusto%20query%3C%2FA%3E%20is%20a%20read-only%20request%20to%20process%20data%20and%20return%20results.%20The%20request%20is%20stated%20in%20plain%20text%2C%20using%20a%20data-flow%20model%20designed%20to%20make%20the%20syntax%20easy%20to%20read%2C%20author%2C%20and%20automate.%20The%20query%20uses%20schema%20entities%20that%20are%20organized%20in%20a%20hierarchy%20similar%20to%20SQL's%3A%20databases%2C%20tables%2C%20and%20columns.%20Along%20with%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-explorer%2Fkql-quick-reference%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EKusto%20Query%20Reference%3C%2FA%3E%2C%20if%20you%20have%20a%20SQL%20background%2C%20you%20will%20find%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-explorer%2Fkusto%2Fquery%2Fsqlcheatsheet%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESQL%20to%20Kusto%20Query%20cheat%20sheet%3C%2FA%3E%20useful.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1137181673%22%20id%3D%22toc-hId-1161134854%22%3ENetworking%20Your%20App%3C%2FH2%3E%0A%3CP%3ENetworking%20your%20applications%20can%20be%20challenging%20as%20there%20are%20so%20many%20options%20from%20connectivity%20and%20security%20perspectives.%20We%20will%20try%20to%20take%20some%20of%20the%20mystery%20out%20of%20the%20various%20networking%20options%20by%20presenting%20concepts%20and%20best%20practices%20as%20you%20are%20considering%20networking%20for%20your%20applications.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--541190071%22%20id%3D%22toc-hId--517236890%22%3EVNet%20Integration%3C%2FH3%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fweb-sites-integrate-with-vnet%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EVNet%20Integration%3C%2FA%3E%20is%20a%20feature%20that%20allows%20outbound%20connectivity%20from%20web%20applications%20to%20the%20selected%20subnet%20within%20the%20VNet.%20This%20allows%20the%20web%20application%20to%20access%20resources%20from%20within%20the%20VNet.%20If%20the%20VNet%20is%20further%20connected%20with%20an%20on-premises%20data%20center%20via%20express%20route%20or%20VPN%20connectivity%2C%20then%20access%20to%20those%20on-premises%20resources%20is%20also%20possible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EVNet%20Integration%20gives%20your%20web%20application%20access%20to%20resources%20in%20your%20virtual%20network%20but%20doesn't%20grant%20inbound%20private%20access%20to%20your%20web%20application%20from%20the%20virtual%20network.%20Private%20site%20access%20refers%20to%20making%20your%20app%20only%20accessible%20from%20a%20private%20network%20such%20as%20from%20within%20an%20Azure%20virtual%20network.%20VNet%20Integration%20is%20only%20for%20making%20outbound%20calls%20from%20your%20app%20into%20your%20VNet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20forms%20of%20the%20VNet%20Integration%20feature%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERegional%20VNet%20Integration%3A%20When%20you%20connect%20to%20Azure%20Resource%20Manager%20virtual%20networks%20in%20the%20same%20region%2C%20you%20must%20have%20a%20dedicated%20subnet%20in%20the%20VNet%20you're%20integrating%20with.%3C%2FLI%3E%0A%3CLI%3EGateway-required%20VNet%20Integration%3A%20When%20you%20connect%20directly%20to%20VNet%20in%20other%20regions%20or%20to%20a%20classic%20virtual%20network%20in%20the%20same%20region%2C%20you%20need%20an%20Azure%20Virtual%20Network%20gateway%20provisioned%20in%20the%20target%20VNet.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-1946322762%22%20id%3D%22toc-hId-1970275943%22%3ENetwork%20Security%20Groups%20(NSGs)%3C%2FH3%3E%0A%3CP%3EWhen%20dealing%20with%20solutions%20integrating%20with%20VNETs%2C%20there%20may%20be%20cases%20where%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fnetwork-security-groups-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ENetwork%20Security%20Group%3C%2FA%3E%20restrictions%20have%20been%20applied%20to%20your%20subnets%2C%20so%20if%20there%20are%20issues%20accessing%20applications%20that%20have%20been%20integrated%20into%20a%20VNet%2C%20it%20should%20be%20one%20of%20the%20first%20places%20you%20look%20to%20diagnose%20connectivity%20issues.%20Where%20NSGs%20are%20involved%2C%20it%20is%20important%20to%20review%20the%20inbound%20and%20outbound%20security%20rules%20to%20ensure%20the%20intended%20traffic%20filtering%20is%20in%20place.%20Do%20remember%20that%20currently%20when%20Private%20Link%20is%20used%2C%20NSG%20rules%20will%20%3CEM%3Enot%3C%2FEM%3E%20be%20evaluated%20(however%2C%20NSG%20and%20UDR%20support%20for%20private%20endpoints%20are%20in%20public%20preview%20on%20select%20regions).%20Please%20see%20the%20later%20section%20on%20Private%20Link%20and%20Private%20Endpoints.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-138868299%22%20id%3D%22toc-hId-162821480%22%3EAzure%20Firewall%3C%2FH3%3E%0A%3CP%3EBased%20on%20your%20solution%20requirements%2C%20all%20inbound%20traffic%20to%20the%20web%20application%20should%20go%20through%20Web%20Application%20Firewall%20enabled%20with%20either%20Azure%20Front%20Door%20or%20Application%20Gateway.%20However%2C%20there%20are%20scenarios%20where%20one%20needs%20to%20send%20outbound%20traffic%20from%20the%20web%20application.%20For%20such%20a%20scenario%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Ffirewall%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Firewall%3C%2FA%3E%20may%20be%20configured%20to%20route%20egress%20traffic.%20The%20web%20application%20will%20need%20to%20have%20VNet%20integration%20set%20up%20with%20the%20VNet%20that%20has%20the%20Azure%20Firewall%20deployed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20may%20be%20a%20use%20case%20where%20one%20needs%20to%20share%20a%20dedicated%20static%20outbound%20IP%20for%20web%20applications%20hosted%20on%20App%20Service%20plans.%20When%20a%20web%20application%20is%20deployed%20on%20an%20App%20Service%20plan%2C%20the%20platform%20provides%20a%20list%20of%20outbound%20IPs%20associated%20with%20the%20web%20application%20that%20may%20get%20assigned.%20To%20advertise%20the%20web%20application%20via%20a%20dedicated%20static%20outbound%20IP%2C%20traffic%20can%20be%20routed%20via%20Azure%20Firewall%2C%20and%20then%20the%20assigned%20public%20IP%20of%20the%20firewall%20can%20be%20advertised%20as%20the%20outbound%20dedicated%20static%20IP.%20Of%20course%2C%20VNet%20integration%20will%20need%20to%20be%20enabled%20to%20the%20VNet%20that%20is%20hosting%20the%20Azure%20Firewall.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EData%20exfiltration%20is%20indeed%20a%20threat%20where%20unauthorized%20data%20transfer%20can%20occur%2C%20so%20do%20use%20Azure%20Firewall%20to%20protect%20against%20data%20exfiltration%20concerns.%20Azure%20Firewall%20can%20be%20leveraged%20as%20reverse%20proxy%20to%20restrict%20access%20to%20only%20authorized%20PaaS%20services%20for%20services%20where%20Private%20Link%20is%20not%20yet%20supported.%20Please%20do%20note%20that%20network%20controls%20alone%20are%20not%20sufficient%20to%20block%20data%20exfiltration%2C%20so%20further%20hardening%20with%20proper%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fframework%2Fsecurity%2Fdesign-identity%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eidentity%20controls%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Farchitecture%2Fframework%2Fsecurity%2Fdesign-storage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ekey%20protections%3C%2FA%3E%2C%20and%20encryption%20is%20also%20needed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1668586164%22%20id%3D%22toc-hId--1644632983%22%3EPrivate%20Endpoints%20and%20Private%20Link%3C%2FH3%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fprivate-link%2Fprivate-endpoint-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPrivate%20Endpoints%3C%2FA%3E%20can%20be%20used%20to%20disable%20all%20public%20access%20and%20thus%20secure%20your%20App%20Service%20web%20application%20when%20you%20want%20to%20access%20only%20from%20within%20the%20same%20VNet%2C%20other%20peered%20VNets%2C%20or%20from%20on-premises%20through%20a%20VPN%20or%20Express%20Route%20connection.%20A%20private%20endpoint%20is%20a%20network%20interface%20that%20uses%20a%20private%20IP%20address%20from%20your%20virtual%20network%2C%20effectively%20bringing%20the%20web%20application%20into%20your%20virtual%20network.%20The%20Private%20Endpoint%20for%20your%20web%20application%20will%20allow%20clients%20located%20in%20your%20private%20network%20to%20securely%20access%20the%20app%20over%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fprivate-link%2Fprivate-link-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPrivate%20Link%3C%2FA%3E%2C%20which%20will%20be%20automatically%20created%20for%20you%20when%20you%20configure%20the%20Private%20Endpoint%20for%20your%20App%20Service%20web%20application.%20Private%20Endpoint%20is%20unidirectional%20and%20can%20be%20used%20only%20to%20secure%20inbound%20traffic.%20For%20restricting%20outbound%20traffic%2C%20refer%20to%20Azure%20Firewall%20or%20VNet%20Integration%20sections.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22walterm_1-1635551587880.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F321719iD0C761C4F3466619%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22walterm_1-1635551587880.png%22%20alt%3D%22walterm_1-1635551587880.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsing%20Private%20Endpoint%20for%20your%20web%20application%20enables%20you%20to%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESecure%20your%20web%20application%20by%20configuring%20the%20Private%20Endpoint%2C%20eliminating%20public%20exposure.%3C%2FLI%3E%0A%3CLI%3ESecurely%20connect%20to%20web%20application%20from%20on-premises%20networks%20that%20connect%20to%20the%20VNet%20using%20a%20VPN%20or%20ExpressRoute%20private%20peering.%3C%2FLI%3E%0A%3CLI%3EAvoid%20any%20data%20exfiltration%20from%20your%20VNet.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EMonitoring%20avenues%20to%20leverage%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EBytes%20In%20%2F%20Out%20on%20Portal%20%E2%80%98Monitoring%E2%80%99%20Blade%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fnetwork-watcher%2Fconnection-monitor-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ENetwork%20Watcher%20Connection%20Monitoring%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Ffirewall%2Ffirewall-diagnostics%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFirewall%20Logs%20and%20Metrics%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3ERunning%20traffic%20--%26gt%3B%20Network%20Virtual%20Appliances%20(NVA)%3C%2FLI%3E%0A%3CLI%3EPrivate%20Link%20service%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fprivate-link%2Fprivate-link-service-overview%23getting-connection-information-using-tcp-proxy-v2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConfiguring%20Proxy%20Protocol%20to%20identify%20source%20Private%20Endpoints%3C%2FA%3E.%3C%2FLI%3E%0A%3CLI%3EPrivate%20Link%20service%3A%20NAT%20Port%20Availability%3C%2FLI%3E%0A%3CLI%3ENSG%20Flow%20Logs%20(Roadmap)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EPrivate%20Link%20for%20App%20Service%20web%20applications%20does%20have%20some%20limitations%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPrivate%20Link%20requires%20a%20premium%20SKU%20web%20application%3C%2FLI%3E%0A%3CLI%3ECurrently%20NSG%E2%80%99s%20do%20not%20apply%20to%20Private%20Link%20(NSG%20and%20UDR%20support%20for%20private%20endpoints%20are%20in%20public%20preview%20on%20select%20regions).%3C%2FLI%3E%0A%3CLI%3EWhen%20Private%20Link%20is%20enabled%20the%20access%20restrictions%20on%20the%20web%20application%20are%20not%20evaluated.%3C%2FLI%3E%0A%3CLI%3EPrivate%20Endpoint%20does%20not%20support%20FTP%20access%20to%20the%20web%20application.%3C%2FLI%3E%0A%3CLI%3ECurrently%20you%20cannot%20monitor%20traffic%20between%20the%20Private%20Endpoint%20and%20Private%20Link%20services.%20However%2C%20you%20can%20monitor%20the%20data%20before%20and%20after%20it%20arrives.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20just%20need%20a%20secure%20connection%20between%20your%20VNet%20and%20your%20web%20application%2C%20a%20Service%20Endpoint%20is%20the%20simplest%20solution%20(explained%20in%20the%20next%20section).%20But%20if%20you%20also%20need%20to%20expose%20your%20app%20over%20a%20private%20IP%20or%20reach%20the%20web%20application%20from%20on-premises%20through%20an%20Azure%20Gateway%2C%20a%20regionally%20peered%20VNet%2C%20or%20a%20globally%20peered%20VNet%2C%20Private%20Endpoint%20is%20the%20best%20solution.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-818926669%22%20id%3D%22toc-hId-842879850%22%3EApp%20Service%20Access%20Restrictions%3C%2FH3%3E%0A%3CP%3EApp%20Service%20access%20restrictions%20are%20for%20the%20most%20part%20straightforward%20when%20it%20comes%20to%20blocking%20on%20a%20set%20of%20IPv4%20or%20IPv6%20address%20blocks%2C%20but%20just%20remember%20it%20is%20looking%20for%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FClassless_Inter-Domain_Routing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ECIDR%3C%2FA%3E%20blocks%20to%20establish%20the%20range%20of%20IP%20addresses%20to%20be%20restricted.%20You%20will%20need%20to%20add%20a%20restriction%20for%20each%20CIDR%20block.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20respect%20to%20the%20Virtual%20Network%20option%2C%20essentially%20what%20you%20are%20specifying%20is%20that%20you%20only%20want%20certain%20VNets%20to%20have%20access%20to%20your%20App%20Service%20application.%20This%20is%20also%20called%20a%20service%20endpoint-based%20rule%2C%20where%20you%20will%20have%20to%20configure%20a%20%3CEM%3EMicrosoft.Web%3C%2FEM%3E%20service%20endpoint%20on%20each%20of%20the%20subnets%20that%20you%20wish%20to%20access%20your%20App%20Service%20application.%20This%20will%20provide%20an%20optimized%20route%20over%20the%20Azure%20network%20backbone%2C%20allowing%20private%20IP%20addresses%20in%20your%20VNet%20to%20access%20your%20App%20Service%20web%20application%20%3CEM%3Ewithout%3C%2FEM%3E%20needing%20a%20public%20IP%20address.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20service%20tag%20is%20similar%20to%20a%20service%20endpoint%2C%20but%20in%20this%20case%20what%20you%20are%20specifying%20is%20that%20you%20only%20want%20certain%20Azure%20%3CEM%3Eservices%3C%2FEM%3E%2C%20such%20as%20Application%20Gateway%20or%20Azure%20Front%20Door%2C%20to%20be%20able%20to%20access%20your%20App%20Service.%20For%20public%20internet-based%20App%20Services%2C%20you%20will%20most%20likely%20use%20this%20setting%20so%20your%20App%20Service%20web%20application%20is%20protected%20behind%20Application%20Gateway%20or%20Azure%20Front%20Door.%20A%20service%20tag%20represents%20a%20list%20of%20IP%20address%20prefixes%2C%20so%20the%20beauty%20of%20service%20tags%20is%20that%20as%20the%20address%20list%20changes%20you%20don%E2%80%99t%20have%20to%20worry%20about%20managing%20that%20IP%20address%20list.%20Microsoft%20will%20manage%20this%20list%20for%20specific%20Azure%20services%20that%20provide%20a%20service%20tag.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2874401%22%20slang%3D%22en-US%22%3E%3CP%3EConsiderations%20from%20FastTrack%20for%20Azure%20engineers%20regarding%20.NET%20application%20migration%20to%20App%20Service%20and%20Azure%20Container%20Instances.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2874401%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApp%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Oct 29 2021 05:16 PM
Updated by: