天天看點

【Azure 應用服務】收集App Service 關于Availability Zone, Health check 以及 Traffic Manager的文檔,并了解高可用(HA)和災備(DR)

問題描述

收集App Service 關于Availability Zone, Health check 以及 Traffic Manager的文檔,并了解高可用(HA)和災備(DR)的具體辦法

問題解答

一:應用服務計劃中的多執行個體(橫向向擴充)以提供備援

​​https://learn.microsoft.com/en-us/archive/msdn-magazine/2017/february/azure-inside-the-azure-app-service-architecture#what-is-an-app-service-scale-unit​​

Scale Unit Main Building Blocks

The main functionality of scale unit is to host and run customer applications. Applications run on Windows servers and are referred to as Web Workers or Workers for short. The majority of servers in a given scale unit are Workers. However, a unit of scale includes several additional support servers required to achieve the functionality provided by App Service. Support servers have roles and each role is deployed on multiple instances for redundancy and scale.

二:啟用 Health Check 以確定在節點不可用時的自動替換

​​https://docs.microsoft.com/en-us/azure/app-service/monitor-instances-health-check?tabs=dotnet​​

What App Service does with Health checks
  • When given a path on your app, Health check pings this path on all instances of your App Service app at 1-minute intervals.
  • If an instance doesn't respond with a status code between 200-299 (inclusive) after 10 requests, App Service determines it's unhealthy and removes it. (The required number of failed requests for an instance to be deemed unhealthy is configurable to a minimum of two requests.)
  • After removal, Health check continues to ping the unhealthy instance. If the instance begins to respond with a healthy status code (200-299) then the instance is returned to the load balancer.
  • If an instance remains unhealthy for one hour, it will be replaced with new instance.
  • When scaling out, App Service pings the Health check path to ensure new instances are ready.

三:使用Traffic Manager + 部署在不同區域的 App Service

​​https://docs.microsoft.com/en-us/azure/app-service/web-sites-traffic-manager​​

Introduction

You can use Azure Traffic Manager to control how requests from web clients are distributed to apps in Azure App Service. When App Service endpoints are added to an Azure Traffic Manager profile, Azure Traffic Manager keeps track of the status of your App Service apps (running, stopped, or deleted) so that it can decide which of those endpoints should receive traffic.

四:對于DR的實作,則主要通過啟用Availability Zone。以及,上文提及的Traffic Manager來實作

​​https://docs.microsoft.com/en-us/azure/availability-zones/migrate-app-service​​

Applications that are deployed in an App Service plan that has availability zones enabled will continue to run and serve traffic even if other zones in the same region suffer an outage. However it's possible that non-runtime behaviors including App Service plan scaling, application creation, application configuration, and application publishing may still be impacted from an outage in other Availability Zones. Zone redundancy for App Service plans only ensures continued uptime for deployed applications.