AI powered Azure tools

Published Jan 20 2021 06:09 PM 2,252 Views
Microsoft

If you are a frequent user of Azure CLI or Azure PowerShell, then chances are that you have experienced one of the AI-powered features our service provides for the Azure command line tools. These features include generating up-to-date command usage examples with each new Azure CLI and Azure PowerShell releases to ensure the documentation is always up to date (“--help” or “-h” in the command line), enabling natural language search of a command in the Azure CLI (az find), assisting with failure recovery, and the recently released AZ Predictor (for Azure PowerShell). Our AI service for Azure tools serves thousands of user requests per second. In order to handle such high scale application workloads we use an Azure App Service tier called App Service Environments (ASE). While ensuring our Azure App Service is scalable and performant, we had to address several key challenges like being able to stress test the service with a high volume of traffic, running the service in fully isolated environments without affecting other Azure subscriptions, and throttling bad actors beyond reasonable levels of requests. We will share our journey of discovery, surprises, and learnings that led us to arrive at an enterprise-grade, cloud-scale AI service that powers our own client tools.

 

Architecture

When a user interacts with one of our integrations in Azure CLI or Azure PowerShell, a request is made to our App Service. To fulfil the request, the App Service gets the result from the relevant AI model. Note that we use different resources for different types of models. For example, the model that generates examples when a user tries to find a command is powered by Azure Search with natural language search features. The failure recovery and AZ Predictor models are more suited to be stored in Azure Storage and loaded into memory to achieve high performance.

Considering the geo-diversity of our users and the high volume of traffic, the service runs in multiple regions to achieve quick response time and high availability. Each request is routed to the nearest region by Azure Traffic Manager (1). In each region, the REST API might talk to:

  • Azure Key Vault (2) to retrieve secrets.
  • Azure Redis Cache (3) to get or set cached response for improved performance.
  • Azure Search (4) to get some of the model results when they are not cached.
  • Azure Storage (5) to load some of the models into memory at service startup or when models need to be refreshed.

Baoping_0-1611193548682.png

 

Figure 1: App Service Architecture

 

Extensibility and Scalability

As we continue to enable more features in the service, it is important to design the App Service in a scalable way. We develop common libraries for accessing Azure resources like Azure Key Vault, Azure Search, and Azure Redis Cache. Those libraries can even be shared with other services as well.

Scalability and performance are critical for the service. A user typing on the command line typically expects a response in less than a second. This requires the service to respond to requests quickly, in the order of milliseconds. We receive thousands of requests per second (RPS), so we need to make sure the service scales fast enough to meet our changing demand. For example, we might experience a peak in the usage pattern when a new version of the Azure CLI comes out. To configure the scaling properly, we started by analyzing Azure CLI usage patterns to understand the expected traffic trends. Figure 2 shows the hourly traffic for the service in the order of 1000s.

 

Baoping_1-1611193548688.png

 

Figure 2: Service Hourly Traffic

Based on the extremes from the usage data, the RPS estimation we used for stress testing was in the order of several 1000s of requests. Note that the estimation we used to stress test is higher than the traffic showed in this figure. This is in part because not all Azure CLI or Azure PowerShell users have upgraded to versions with our service integrations. We decided to play it safe with stress testing and prepare for the maximum number of requests we might receive plus some additional margin.

As it turned out, being able to stress test the service with thousands of requests per second was a huge challenge.

 

Stress Test Journey

We explored a variety of stress testing tools including loader.io and JMeter. At the end we decided to use JMeter because it offers a few key features: the ability to control requests per second, it is fully supported in Azure DevOps, and it is actively maintained. However, using JMeter involved its own challenges:

  • RPS limit from one machine. We quickly found that because of the amount of TCP connections created by our JMeter script, we could only send around 1,000 RPS from one machine.
  • Configuration needed to maintain multiple VMs in VMSS. Using multiple machines was necessary to overcome the above RPS limit from one machine.

We then considered running Azure Container Instance (ACI) to overcome these limitations. ACI is Azure CLI-friendly and we found it was quite easy to prepare and run a container in Azure. We were able to easily and quickly launch our images in multiple ACIs to reach our target RPS without the pain of having to individually configure and maintain multiple VMs.

 

App Service Environments

This led us to an unexpected challenge. Hitting our service with 1000s of RPS brought down our service, because it was overloading the load balancing front ends for that stamp. A stamp is a cluster of servers. You can think of it as groups of racks with shared resources like traffic routing within an Azure Data Center. To avoid this issue, we moved to App Service Environments (ASE) for our infrastructure. ASE provides a fully-isolated and dedicated environment for securely running App Services on a high scale. This includes isolated load balancing front ends for network routing.

With the right architecture in place, we were able to scale both horizontally and vertically. Horizontal scaling is done by increasing the number of routing front ends and App instances in proportion to actual traffic. Vertical scaling is done through choosing the right tiers for Azure Redis Cache, Azure Search Service, and App Service plan.

 

Throttling

Bad actors and broken scripts could bombard the service beyond reasonable levels of requests. Instead of allowing these clients to potentially bring the service down, we would ideally start blocking individual bad actors. The service implements both Client- and IP-based rate limiting. Having both these options allow us to be flexible, minimize slowdowns, and keeps the service running even when hit by bad actors.

 

Reliability

As shown in the architecture diagram, we deploy the service to multiple geographic regions which are aligned with the distribution of Azure CLI users to make sure every user’s request can be served from a deployment with low latency. This helps us ensure we meet our service health targets. Our reliability goal is that 99.99% of requests in the preceding 5 minutes were successful. Our latency goal is that for the requests in the preceding 15 minutes are served in under 700 milliseconds for the 99.9th percentile.

All traffic for the services is routed by Azure Traffic Manager. When Traffic Manager detects that a region is unhealthy (which is checked via a monitor API defined in the service) the traffic is then routed to the next closest region.

 

Deployment

We use Azure DevOps and Azure Resource Manager templates (ARM) to deploy the service. Deployment is first tested in Dev and PPE (pre-production environments) environments. An interesting learning is that the first ASE deployment takes 1.5 – 2 hours, though subsequent deployments are much shorter.

Our release pipeline follows the ring-based deployment process with the goal of being able to limit failures to the minimum number of customers.

 

Monitoring

Monitoring is important to make sure we know right away when something goes wrong. This is essential for us to meet our reliability and availability requirements. The service logs various metrics which are then used in a variety of alerts to the team: when an API call fails, when the App Service performance is degraded, when some resource in a region fails, when a region goes down etc. The metrics data is processed in near-real-time alerts (60s ingestion latency).

 

Help us make the tools that you love and use every day even better. You can provide feedback by creating an issue in Azure CLI GitHub page and Azure PowerShell GitHub Page.

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2080799%22%20slang%3D%22en-US%22%3EAI%20powered%20Azure%20tools%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080799%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20a%20frequent%20user%20of%20Azure%20CLI%20or%20Azure%20PowerShell%2C%20then%20chances%20are%20that%20you%20have%20experienced%20one%20of%20the%20AI-powered%20features%20our%20service%20provides%20for%20the%20Azure%20command%20line%20tools.%20These%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-tools%2Fempowering-azure-cli-developers-with-ai%2Fba-p%2F1701251%22%20target%3D%22_blank%22%3Efeatures%3C%2FA%3E%20include%20generating%20up-to-date%20command%20usage%20examples%20with%20each%20new%20Azure%20CLI%20and%20Azure%20PowerShell%20releases%20to%20ensure%20the%20documentation%20is%20always%20up%20to%20date%20(%E2%80%9C--help%E2%80%9D%20or%20%E2%80%9C-h%E2%80%9D%20in%20the%20command%20line)%2C%20enabling%20natural%20language%20search%20of%20a%20command%20in%20the%20Azure%20CLI%20(az%20find)%2C%20assisting%20with%20failure%20recovery%2C%20and%20the%20recently%20released%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-tools%2Fannouncing-az-predictor%2Fba-p%2F1873104%22%20target%3D%22_blank%22%3EAZ%20Predictor%3C%2FA%3E%20(for%20Azure%20PowerShell).%20Our%20AI%20service%20for%20Azure%20tools%20serves%20thousands%20of%20user%20requests%20per%20second.%20In%20order%20to%20handle%20such%20high%20scale%20application%20workloads%20we%20use%20an%20Azure%20App%20Service%20tier%20called%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fenvironment%2Fintro%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApp%20Service%20Environments%20(ASE)%3C%2FA%3E.%20While%20ensuring%20our%20Azure%20App%20Service%20is%20scalable%20and%20performant%2C%20we%20had%20to%20address%20several%20key%20challenges%20like%20being%20able%20to%20stress%20test%20the%20service%20with%20a%20high%20volume%20of%20traffic%2C%20running%20the%20service%20in%20fully%20isolated%20environments%20without%20affecting%20other%20Azure%20subscriptions%2C%20and%20throttling%20bad%20actors%20beyond%20reasonable%20levels%20of%20requests.%20We%20will%20share%20our%20journey%20of%20discovery%2C%20surprises%2C%20and%20learnings%20that%20led%20us%20to%20arrive%20at%20an%20enterprise-grade%2C%20cloud-scale%20AI%20service%20that%20powers%20our%20own%20client%20tools.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1947819266%22%20id%3D%22toc-hId-1947819266%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-140364803%22%20id%3D%22toc-hId-140364803%22%3EArchitecture%3C%2FH3%3E%0A%3CP%3EWhen%20a%20user%20interacts%20with%20one%20of%20our%20integrations%20in%20Azure%20CLI%20or%20Azure%20PowerShell%2C%20a%20request%20is%20made%20to%20our%20App%20Service.%20To%20fulfil%20the%20request%2C%20the%20App%20Service%20gets%20the%20result%20from%20the%20relevant%20AI%20model.%20Note%20that%20we%20use%20different%20resources%20for%20different%20types%20of%20models.%20For%20example%2C%20the%20model%20that%20generates%20examples%20when%20a%20user%20tries%20to%20find%20a%20command%20is%20powered%20by%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Search%3C%2FA%3E%20with%20natural%20language%20search%20features.%20The%20failure%20recovery%20and%20AZ%20Predictor%20models%20are%20more%20suited%20to%20be%20stored%20in%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Storage%3C%2FA%3E%20and%20loaded%20into%20memory%20to%20achieve%20high%20performance.%3C%2FP%3E%0A%3CP%3EConsidering%20the%20geo-diversity%20of%20our%20users%20and%20the%20high%20volume%20of%20traffic%2C%20the%20service%20runs%20in%20multiple%20regions%20to%20achieve%20quick%20response%20time%20and%20high%20availability.%20Each%20request%20is%20routed%20to%20the%20nearest%20region%20by%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%3EAzure%20Traffic%20Manager%3C%2FA%3E%3CSPAN%3E%20(1)%3C%2FSPAN%3E.%20In%20each%20region%2C%20the%20REST%20API%20might%20talk%20to%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkey-vault%2Fgeneral%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Key%20Vault%3C%2FA%3E%20(2)%20to%20retrieve%20secrets.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Redis%20Cache%3C%2FA%3E%20(3)%20to%20get%20or%20set%20cached%20response%20for%20improved%20performance.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Search%3C%2FA%3E%20(4)%20to%20get%20some%20of%20the%20model%20results%20when%20they%20are%20not%20cached.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Storage%3C%2FA%3E%20(5)%20to%20load%20some%20of%20the%20models%20into%20memory%20at%20service%20startup%20or%20when%20models%20need%20to%20be%20refreshed.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Baoping_0-1611193548682.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F247913i383FDE3379620CBC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Baoping_0-1611193548682.png%22%20alt%3D%22Baoping_0-1611193548682.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%3CEM%3EFigure%201%3A%20App%20Service%20Architecture%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1667089660%22%20id%3D%22toc-hId--1667089660%22%3EExtensibility%20and%20Scalability%3C%2FH3%3E%0A%3CP%3EAs%20we%20continue%20to%20enable%20more%20features%20in%20the%20service%2C%20it%20is%20important%20to%20design%20the%20App%20Service%20in%20a%20scalable%20way.%20We%20develop%20common%20libraries%20for%20accessing%20Azure%20resources%20like%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkey-vault%2Fgeneral%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Key%20Vault%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Search%3C%2FA%3E%2C%20and%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Redis%20Cache%3C%2FA%3E.%20Those%20libraries%20can%20even%20be%20shared%20with%20other%20services%20as%20well.%3C%2FP%3E%0A%3CP%3EScalability%20and%20performance%20are%20critical%20for%20the%20service.%20A%20user%20typing%20on%20the%20command%20line%20typically%20expects%20a%20response%20in%20less%20than%20a%20second.%20This%20requires%20the%20service%20to%20respond%20to%20requests%20quickly%2C%20in%20the%20order%20of%20milliseconds.%20We%20receive%20thousands%20of%20requests%20per%20second%20(RPS)%2C%20so%20we%20need%20to%20make%20sure%20the%20service%20scales%20fast%20enough%20to%20meet%20our%20changing%20demand.%20For%20example%2C%20we%20might%20experience%20a%20peak%20in%20the%20usage%20pattern%20when%20a%20new%20version%20of%20the%20Azure%20CLI%20comes%20out.%20To%20configure%20the%20scaling%20properly%2C%20we%20started%20by%20analyzing%20Azure%20CLI%20usage%20patterns%20to%20understand%20the%20expected%20traffic%20trends.%20Figure%202%20shows%20the%20hourly%20traffic%20for%20the%20service%20in%20the%20order%20of%201000s.%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-center%22%20image-alt%3D%22Baoping_1-1611193548688.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F247912i1AFCF41DA5D978DC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Baoping_1-1611193548688.png%22%20alt%3D%22Baoping_1-1611193548688.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%3CEM%3EFigure%202%3A%20Service%20Hourly%20Traffic%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EBased%20on%20the%20extremes%20from%20the%20usage%20data%2C%20the%20RPS%20estimation%20we%20used%20for%20stress%20testing%20was%20in%20the%20order%20of%20several%201000s%20of%20requests.%20Note%20that%20the%20estimation%20we%20used%20to%20stress%20test%20is%20higher%20than%20the%20traffic%20showed%20in%20this%20figure.%20This%20is%20in%20part%20because%20not%20all%20Azure%20CLI%20or%20Azure%20PowerShell%20users%20have%20upgraded%20to%20versions%20with%20our%20service%20integrations.%20We%20decided%20to%20play%20it%20safe%20with%20stress%20testing%20and%20prepare%20for%20the%20maximum%20number%20of%20requests%20we%20might%20receive%20plus%20some%20additional%20margin.%3C%2FP%3E%0A%3CP%3EAs%20it%20turned%20out%2C%20being%20able%20to%20stress%20test%20the%20service%20with%20thousands%20of%20requests%20per%20second%20was%20a%20huge%20challenge.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--976528186%22%20id%3D%22toc-hId--976528186%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH5%20id%3D%22toc-hId--285966712%22%20id%3D%22toc-hId--285966712%22%3EStress%20Test%20Journey%3C%2FH5%3E%0A%3CP%3EWe%20explored%20a%20variety%20of%20stress%20testing%20tools%20including%20%3CA%20href%3D%22https%3A%2F%2Floader.io%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eloader.io%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fjmeter.apache.org%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EJMeter%3C%2FA%3E.%20At%20the%20end%20we%20decided%20to%20use%20JMeter%20because%20it%20offers%20a%20few%20key%20features%3A%20the%20ability%20to%20control%20requests%20per%20second%2C%20it%20is%20fully%20supported%20in%20Azure%20DevOps%2C%20and%20it%20is%20actively%20maintained.%20However%2C%20using%20JMeter%20involved%20its%20own%20challenges%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ERPS%20limit%20from%20one%20machine.%3C%2FSTRONG%3E%20We%20quickly%20found%20that%20because%20of%20the%20amount%20of%20TCP%20connections%20created%20by%20our%20JMeter%20script%2C%20we%20could%20only%20send%20around%201%2C000%20RPS%20from%20one%20machine.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EConfiguration%20needed%20to%20%3C%2FSTRONG%3E%3CSTRONG%3Emaintain%20multiple%20VMs%20in%20VMSS%3C%2FSTRONG%3E%3CSTRONG%3E.%3C%2FSTRONG%3E%20Using%20multiple%20machines%20was%20necessary%20to%20overcome%20the%20above%20RPS%20limit%20from%20one%20machine.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWe%20then%20considered%20running%20Azure%20Container%20Instance%20(ACI)%20to%20overcome%20these%20limitations.%20ACI%20is%20Azure%26nbsp%3BCLI-friendly%20and%20we%20found%20it%20was%20quite%20easy%20to%20prepare%20and%20run%20a%20container%20in%20Azure.%20We%20were%20able%20to%20easily%20and%20quickly%20launch%20our%20images%20in%20multiple%20ACIs%20to%20reach%20our%20target%20RPS%20without%20the%20pain%20of%20having%20to%20individually%20configure%20and%20maintain%20multiple%20VMs.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--296469816%22%20id%3D%22toc-hId--296469816%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH5%20id%3D%22toc-hId-394091658%22%20id%3D%22toc-hId-394091658%22%3EApp%20Service%20Environments%3C%2FH5%3E%0A%3CP%3EThis%20led%20us%20to%20an%20unexpected%20challenge.%20Hitting%20our%20service%20with%201000s%20of%20RPS%20brought%20down%20our%20service%2C%20because%20it%20was%20overloading%20the%20load%20balancing%20front%20ends%20for%20that%20stamp.%20A%20stamp%20is%20a%20cluster%20of%20servers.%20You%20can%20think%20of%20it%20as%20groups%20of%20racks%20with%20shared%20resources%20like%20traffic%20routing%20within%20an%20Azure%20Data%20Center.%20To%20avoid%20this%20issue%2C%20we%20moved%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fenvironment%2Fintro%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApp%20Service%20Environment%3C%2FA%3Es%20(ASE)%20for%20our%20infrastructure.%20ASE%20provides%20a%20fully-isolated%20and%20dedicated%20environment%20for%20securely%20running%20App%20Services%20on%20a%20high%20scale.%20This%20includes%20isolated%20load%20balancing%20front%20ends%20for%20network%20routing.%3C%2FP%3E%0A%3CP%3EWith%20the%20right%20architecture%20in%20place%2C%20we%20were%20able%20to%20scale%20both%20horizontally%20and%20vertically.%20Horizontal%20scaling%20is%20done%20by%20increasing%20the%20number%20of%20routing%20front%20ends%20and%20App%20instances%20in%20proportion%20to%20actual%20traffic.%20Vertical%20scaling%20is%20done%20through%20choosing%20the%20right%20tiers%20for%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Redis%20Cache%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Search%20Service%3C%2FA%3E%2C%20and%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-hosting-plans%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EApp%20Service%20plan%3C%2FA%3E.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--2114427383%22%20id%3D%22toc-hId--2114427383%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-373085450%22%20id%3D%22toc-hId-373085450%22%3EThrottling%3C%2FH3%3E%0A%3CP%3EBad%20actors%20and%20broken%20scripts%20could%20bombard%20the%20service%20beyond%20reasonable%20levels%20of%20requests.%20Instead%20of%20allowing%20these%20clients%20to%20potentially%20bring%20the%20service%20down%2C%20we%20would%20ideally%20start%20blocking%20individual%20bad%20actors.%20The%20service%20implements%20both%20Client-%20and%20IP-based%20rate%20limiting.%20Having%20both%20these%20options%20allow%20us%20to%20be%20flexible%2C%20minimize%20slowdowns%2C%20and%20keeps%20the%20service%20running%20even%20when%20hit%20by%20bad%20actors.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1434369013%22%20id%3D%22toc-hId--1434369013%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-357980341%22%20id%3D%22toc-hId-357980341%22%3E%3CSPAN%3EReliability%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3EAs%20shown%20in%20the%20architecture%20diagram%2C%20we%20deploy%20the%20service%20to%20multiple%20geographic%20regions%20which%20are%20aligned%20with%20the%20distribution%20of%20Azure%20CLI%20users%20to%20make%20sure%20every%20user%E2%80%99s%20request%20can%20be%20served%20from%20a%20deployment%20with%20low%20latency.%20This%20helps%20us%20ensure%20we%20meet%20our%20service%20health%20targets.%20Our%20reliability%20goal%20is%20that%2099.99%25%20of%20requests%20in%20the%20preceding%205%20minutes%20were%20successful.%20Our%20latency%20goal%20is%20that%20for%20the%20requests%20in%20the%20preceding%2015%20minutes%20are%20served%20in%20under%20700%20milliseconds%20for%20the%2099.9th%20percentile.%3C%2FP%3E%0A%3CP%3EAll%20traffic%20for%20the%20services%20is%20routed%20by%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%3EAzure%20Traffic%20Manager%3C%2FA%3E.%20When%20Traffic%20Manager%20detects%20that%20a%20region%20is%20unhealthy%20(which%20is%20checked%20via%20a%20monitor%20API%20defined%20in%20the%20service)%20the%20traffic%20is%20then%20routed%20to%20the%20next%20closest%20region.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1449474122%22%20id%3D%22toc-hId--1449474122%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-1038038711%22%20id%3D%22toc-hId-1038038711%22%3E%3CSPAN%3EDeployment%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3EWe%20use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fuser-guide%2Fwhat-is-azure-devops%3Fview%3Dazure-devops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20DevOps%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Ftemplates%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Resource%20Manager%20templates%3C%2FA%3E%20(ARM)%20to%20deploy%20the%20service.%20Deployment%20is%20first%20tested%20in%20Dev%20and%20PPE%20(pre-production%20environments)%20environments.%20An%20interesting%20learning%20is%20that%20the%20first%20ASE%20deployment%20takes%201.5%20%E2%80%93%202%20hours%2C%20though%20subsequent%20deployments%20are%20much%20shorter.%3C%2FP%3E%0A%3CP%3EOur%20release%20pipeline%20follows%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fmigrate%2Fphase-rollout-with-rings%3Fview%3Dazure-devops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ering-based%20deployment%3C%2FA%3E%20process%20with%20the%20goal%20of%20being%20able%20to%20limit%20failures%20to%20the%20minimum%20number%20of%20customers.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--769415752%22%20id%3D%22toc-hId--769415752%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-1718097081%22%20id%3D%22toc-hId-1718097081%22%3EMonitoring%3C%2FH3%3E%0A%3CP%3EMonitoring%20is%20important%20to%20make%20sure%20we%20know%20right%20away%20when%20something%20goes%20wrong.%20This%20is%20essential%20for%20us%20to%20meet%20our%20reliability%20and%20availability%20requirements.%20The%20service%20logs%20various%20metrics%20which%20are%20then%20used%20in%20a%20variety%20of%20alerts%20to%20the%20team%3A%20when%20an%20API%20call%20fails%2C%20when%20the%20App%20Service%20performance%20is%20degraded%2C%20when%20some%20resource%20in%20a%20region%20fails%2C%20when%20a%20region%20goes%20down%20etc.%20The%20metrics%20data%20is%20processed%20in%20near-real-time%20alerts%20(60s%20ingestion%20latency).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHelp%20us%20make%20the%20tools%20that%20you%20love%20and%20use%20every%20day%20even%20better.%20You%20can%20provide%20feedback%20by%20creating%20an%20issue%20in%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20CLI%20GitHub%20page%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-powershell%2Fissues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20PowerShell%20GitHub%20Page%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2080799%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20a%20frequent%20user%20of%20Azure%20CLI%20or%20Azure%20PowerShell%2C%20then%20chances%20are%20that%20you%20have%20experienced%20one%20of%20the%20AI-powered%20features%20our%20service%20provides%20for%20the%20Azure%20command%20line%20tools.%26nbsp%3BWe%20will%20share%20our%20journey%20of%20discovery%2C%20surprises%2C%20and%20learnings%20that%20led%20us%20to%20arrive%20at%20an%20enterprise-grade%2C%20cloud-scale%20AI%20service%20that%20powers%20our%20own%20client%20tools.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2080799%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzureCLI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Jan 20 2021 06:09 PM
Updated by: