How Azure can help your company expand in multiple regions (3 of 5)
Tags: azure, azurefrontdoor, azurewebapp
Published: 2021-06-30 11:58:36

In my previous article, we created an Azure SQL database resource, replicated it in Europe, and set it up to synchronize with Contoso’s primary database in Montana. In today’s article, I will move forward and creating an App Service resource, replicating it in North Europe, and setting up an Azure Front Door resource that will load-balance and forward the HTTP requests to the closest App Service.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qllchir79x5n2loi15nj.png)
 
#Create a new App Service
- Select Create a resource, filter the result for **Web**, and click on **Web App**.
- In the creation tab, select a resource group, insert a name unique within Azure, select the Central US region (primary location of Contoso), and select a runtime and size.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1de7pykdzvd8skd5yq4v.png)
 
- In the monitoring tab, enable Application Insights and give it a descriptive name.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cuobj8j8r08fxaehitja.png)
 
- Click **Review + create** to create the web application.
Repeat this procedure for the instance of the application in North Europe.

##Configure the app service
In this step, you are going to set the connection string of your App Services to the database in the same region. First, you need to get the database’s connection string, to do so:
- Enter into the resource group with the resources that you created in the previous steps
- Select the database located in the same region as your App Service.
- Select the **Connection Strings** tab and copy the value into the clipboard.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6i5ive12l7m939e88k6.png) 

- Go back into your resource group and select your App Service
- Select the **Configuration** tab and click **New connection string**
- Enter a descriptive name, select the **SQLServer** type and paste the connection string that you previously copied.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tti92vachk133asz8zh0.png)
 
- Click **OK**
- Click **Save** to confirm your changes
Repeat this procedure for the instance of the application in North Europe.

#Create an Azure Front Door
- Select **Create a resource**, filter the result for **Networking**, and click on **Azure Front Door**.
- In the **Basics** tab, select the resource group with your resources.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37jdhuauzw4h78un4lnv.png)
 
- Select the **Configuration** tab and in **Frontends/domains** select + to add a unique host name.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66ayswtiuwzlf93tnk51.png)

- In **Backend pools** select + and add the App Services that we previously created.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsv42htbfuikuu672jh8.png) 

- In **Routing rules** select + to create a rule that will map your frontend host to the backend pool.
- Give your rule a name and select **Add**

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1qzeesvagaph7hmyxgvs.png)
 
- Click **Review + Create**, and then **Create**.

#Resources
- **Azure Front Door:** https://azure.microsoft.com/en-us/services/frontdoor
- **Azure App Service:** https://azure.microsoft.com/en-us/services/app-service/