Architect a multi-region web application solution with a private database in Microsoft Azure

Introduction

Today, we will look into a multi-region solution for a web application to provide redundancy. We will see how it is recommended to be setup using the architecture proposed by Microsoft. We will also see how the database used by the web application will be available via a private endpoint and not accessible from the internet. This will give us a very robust, secure, and highly available web application solution using Microsoft Azure.


Reference diagram

We will start with the diagram provided by Microsoft. Details are available at the Microsoft website below:

https://learn.microsoft.com/en-us/azure/architecture/example-scenario/sql-failover/app-service-private-sql-multi-region


No alt text provided for this image


Components of the design

The diagram might seem very complex at the first glance, but it is quite simple to understand and set-up. In the first region called the “Primary region” we setup an Azure app service to host our web application. We then integrate this app service into a new/existing virtual network and subnet in Azure and disallow direct access to the App service from the outside. We then setup a private link subnet in the same virtual network and setup a private endpoint to the database e.g., Azure SQL database. Direct access to the database from the internet is also removed. Hence, we can only talk to the database using the private endpoint from the App service.

We then replicate the same setup in another region called the “Secondary region”. We than setup virtual network peering between the virtual networks in both regions and setup database geo-replication between the two databases. This will ensure that any database changes in the primary region are replicated with the database in the secondary region in case we need to start using the secondary region.

Next, comes the final service in this architecture design. That is the Azure front door service. This is the point to which internet users will connect to access our application. We will only connect to our app services from the front door. Here, we will set the primary region which will handle our requests. Here, we will also setup our secondary region to which we switch over in case of a failure of the primary region. We also enable WAF (Web Application Firewall) services here to provide extra security against attacks like SQL-Injection etc.?

Two things I would like to add to this diagram would be the below:

1.?????Azure monitor and diagnostic settings for the Database and Front door service to monitor transactions and status.

2.?????Application Insights for detailed instrumentation of the App services.

?

Summary

In today’s article, we looked at how we can design an architecture for a multi-region web application to provide redundancy. We also saw how the database used by the web application will be available via a private endpoint and will not be accessible directly from the internet. This gave us a very robust, secure, and highly available web application solution using Microsoft Azure services. This solution is only recommended for applications that require a very high availability level as we are setting it up in multi-regions to prevent any downtime. The costs will be high as we have a duplicated services architecture.

要查看或添加评论,请登录

Munib Butt的更多文章

  • Using Azure Event Grid to generate and consume events

    Using Azure Event Grid to generate and consume events

    Summary In today’s article we will look at how we can use Azure’s Event Grid to pass events from one application or…

  • Overview of new features in .NET 8

    Overview of new features in .NET 8

    Summary Today, we will look at the main features introduced with .NET 8, the latest .

  • Introduction to Computer Science

    Introduction to Computer Science

    Summary Today, we will look at some of the main topics that are covered as part of the “Introduction to Computer…

  • Load, compile, and run C# code dynamically

    Load, compile, and run C# code dynamically

    Introduction Today, we will look into how we can dynamically load C# code into our solution, compile this code, run it,…

    1 条评论
  • What really is this thing called generative AI?

    What really is this thing called generative AI?

    What is generative AI? Generative AI is a branch of artificial intelligence that focuses on creating new content or…

  • Bing Search with AI

    Bing Search with AI

    Introduction These days, search engines play a vital role in helping users find relevant information quickly and…

  • Test your APIs from within Visual Studio 2022

    Test your APIs from within Visual Studio 2022

    Introduction Today, we will look into a very useful feature just introduced with Visual Studio 2022 version 17.5.

  • New features introduced in .NET 8

    New features introduced in .NET 8

    Today, we will look into some new features that are expected in .NET 8.

  • Design an Azure DevOps CI/CD solution

    Design an Azure DevOps CI/CD solution

    Introduction Today, we will look into a CI/CD pipeline solution. We will look at the process from logging a task to…

  • 3 steps to migrate a legacy application

    3 steps to migrate a legacy application

    Introduction These days I have come across various organizations that have these massive legacy applications that have…

社区洞察

其他会员也浏览了