Azure Multi-region Web Application with CosmosDB

    # Azure Multi-region Web App with CosmosDB ## Description 📝 This scenario can be considered as both a high-availability solution and a Disaster Recovery strategy. It uses multi-region deployment for the Web APP and geo-replication for storage account and CosmosDB. # Architecture components 🏛️ 1. Resource Group 2. CDN frontdoor profile 3. CDN frontdoor custom domain 4. DNS zone 5. Service plan 6. Linux WEB App 7. Linux Function APP 8. Storage Account 9. Redis cache 10. CosmosDB 11. Redis linked service This architecture uses two regions, primary and secondary to achieve higher availability. The application is deployed to each region on the Linux Web App. During regular operations, network traffic is routed to the primary region. Traffic is routed to the secondary region if the primary region becomes unreachable. **Azure DNS** is a high-availability service for DNS domains that provides apps with fast DNS queries and quick updates to DNS records. **Azure Front Door** is a modern cloud Content Delivery Network (CDN) that provides fast, reliable, and secure access between your users and your applications’ static and dynamic web content across the globe. Azure Front Door delivers content using Microsoft’s global edge network with hundreds of global and local points of presence (PoPs) distributed worldwide close to both the enterprise and consumer end users. **Azure Functions** is an on-demand cloud service that provides all the continually updated infrastructure and resources needed to run your applications. They provide an environment for running small pieces of code, called functions, without establishing an application infrastructure. You can use it to process bulk data, integrate systems, work with IoT, and build simple APIs and microservices. With microservices, you can create servers that connect to Azure services and are always up to date. **Azure Cache for Redis** is a fully managed in-memory caching service and message broker for sharing data and state among computing resources. It includes both the open-source Redis and a commercial product from Redis Labs as managed services. You can improve the performance of high-throughput online transaction processing applications by designing them to scale and using an in-memory data store such as Azure Cache for Redis. **Azure Cosmos DB** is a fully managed NoSQL and relational database for modern app development. Azure Cosmos DB offers single-digit millisecond response times, automatic and instant scalability, and guaranteed speed at any scale. In addition, business continuity is assured with SLA-backed availability and enterprise-grade security. It is a globally distributed, multi-model database that enables your solutions to scale throughput and storage across any number of geographic regions. In our scenario we have configured geo-replication in two different regions East US and Central US # Requirements ☑ | Name | Configuration | | --- | --- | | Terraform | all versions | | Provider | Azurerm | | Provider version | 3.37 | ## How to use the architecture 🚀 To use this architecture, clone it within your project and change the following components: | Variable | Description | | --- | --- | | hostname | hostname for your specific application | | location | location for the main resource | | region1 | Location for primary region | | region2 | Location for secondary region | # Maintainer(s) 👋 - [Chafik Belhaoues]( - [Brainboard team](