Azure Proactive Resiliency Library v2
Tools Glossary GitHub GitHub Issues Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

sites

Summary

RecommendationImpactCategoryAutomation AvailablePG Verified
診断ログを有効にするLowMonitoring and AlertingNoPreview
パフォーマンスを監視するMediumMonitoring and AlertingNoPreview
Web アプリを Web API から分離するLowScalabilityNoPreview
ログ用に別のストレージ アカウントを作成するMediumScalabilityNoPreview
ステージング スロットにデプロイするLowGovernanceYesPreview
設定をアプリ設定として保存するMediumOther Best PracticesYesPreview
App Services のヘルスチェックを有効にするMediumOther Best PracticesYesPreview
ネットワークアクセス制限を構成するMediumGovernanceYesPreview
アプリサービスの最小インスタンス数を 2 に設定しますMediumScalabilityYesPreview

Details


診断ログを有効にする

Impact:  Low Category:  Monitoring and Alerting PG Verified:  Preview

Description:

Azure App Service の診断ログを有効にすることは、アプリケーション ログと Web サーバー ログの両方を含む監視と診断にとって重要です。

Potential Benefits:

Monitoring and Alerting
Learn More:
Enable diagnostics logging for apps in Azure App Service

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg




パフォーマンスを監視する

Impact:  Medium Category:  Monitoring and Alerting PG Verified:  Preview

Description:

Application Insights を使用してアプリのパフォーマンスと負荷動作を監視し、リアルタイムの洞察、問題の診断、根本原因の分析を提供します。 Azure App Service で ASP.NET、ASP.NET Core、Java、Node.js をサポートし、監視が組み込まれるようになりました。

Potential Benefits:

Real-time insights and issue diagnosis
Learn More:
Application Insights
Application monitoring for Azure App Service

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg




Web アプリを Web API から分離する

Impact:  Low Category:  Scalability PG Verified:  Preview

Description:

ソリューションに Web フロント エンドと Web API の両方が含まれている場合、それらを個別の App Service アプリに分解すると、ワークロードごとのソリューションの分解が容易になり、独立したスケーリングが可能になります。最初は両方を同じプランにデプロイし、必要に応じて独立したスケーリングのためにそれらを分離できます。

Potential Benefits:

Independent scaling, easier management
Learn More:
Resiliency checklist for specific Azure services

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg



ログ用に別のストレージ アカウントを作成する

Impact:  Medium Category:  Scalability PG Verified:  Preview

Description:

ログ用に別のストレージ アカウントを作成し、アプリケーション データには同じストレージ アカウントを使用しないようにすると、アプリケーション データの処理専用のリソースにログ プロセスによる負荷がかからなくなり、ログ アクティビティによるアプリケーションのパフォーマンスの低下を防ぐことができます。

Potential Benefits:

Improves app performance
Learn More:
Resiliency checklist

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg



ステージング スロットにデプロイする

Impact:  Low Category:  Governance PG Verified:  Preview

Description:

ステージング用のデプロイメント スロットを作成して更新をデプロイし、検証し、運用環境のスワップ前にすべてのインスタンスがウォームアップされていることを確認し、不適切な更新の可能性を減らします。 LKG スロットを使用すると、後で問題が発生した場合に以前の良好な展開に簡単にロールバックできるため、信頼性が向上します。

Potential Benefits:

Safer updates and easy rollback
Learn More:
Set up staging environments in Azure App Service

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Display App Service with the count of deployment slots for Apps under eligible App service plans and it shows if deployment slot is enabled or not

resources
| where type =~ 'microsoft.web/sites' or type =~ 'microsoft.web/sites/slots'
| extend isSlot = iff(type =~ 'microsoft.web/sites/slots', 1, 0)
| extend AspName = iff(isSlot == 1, split(name, '/')[0], name)
| extend Sku = tostring(properties.sku)
| where tolower(Sku) contains "standard" or tolower(Sku) contains "premium" or tolower(Sku) contains "isolatedv2"
| project id, name, AspName, isSlot, Sku
| summarize Slots = countif(isSlot == 1) by id, name, AspName, Sku
| extend DeploymentSlotEnabled = iff(Slots > 1, true, false)
| where DeploymentSlotEnabled = false
| project recommendationId="a1d91661-32d4-430b-b3b6-5adeb0975df7", name, id, tags="", param1=Sku, param2=Slots, param3="DeploymentSlotEnabled=false"



設定をアプリ設定として保存する

Impact:  Medium Category:  Other Best Practices PG Verified:  Preview

Description:

構成にアプリ設定を使用し、Resource Manager テンプレートまたは PowerShell 経由で定義して、自動展開/更新プロセスの一部を容易にして信頼性を向上させます。

Potential Benefits:

Enhanced reliability via automation
Learn More:
Configure web apps in Azure App Service

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Provides a list of Azure App Service resources that don't have App Settings configured

appserviceresources
| where type == "microsoft.web/sites/config"
| extend AppSettings = iif(isempty(properties.AppSettings), true, false)
| where AppSettings == false
| project  recommendationId="0b80b67c-afbe-4988-ad58-a85a146b681e", id, name, tags="", param1="AppSettings is not configured"



App Services のヘルスチェックを有効にする

Impact:  Medium Category:  Other Best Practices PG Verified:  Preview

Description:

実稼働ワークロードにはヘルスチェックを使用します。ヘルスチェックは、異常なインスタンスからリクエストを再ルーティングし、異常なままの場合はインスタンスを置き換えることにより、アプリケーションの可用性を高めます。ヘルスチェックパスは、アプリケーションの重要なコンポーネントをチェックする必要があります。

Potential Benefits:

Enhanced reliability via automation
Learn More:
Monitor the health of App Service instances

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Check if Health Check is enabled for App Service

resources
| where type =~ 'microsoft.web/sites'
| where properties.kind has 'app'
| join kind = inner
    (
    appserviceresources
    | where isnull(properties.HealthCheckPath) == true
    | project  name
    ) on name
| project recommendationId = "fd049c28-ae6d-48f0-a641-cc3ba1a3fe1d", name, id, tags, param1 = "Healthcheckpath = not set"


ネットワークアクセス制限を構成する

Impact:  Medium Category:  Governance PG Verified:  Preview

Description:

ネットワーク アクセス制限を使用して、アプリへのネットワーク アクセスを制御する優先順位の許可/拒否リストを定義します。公開 Web アプリケーションの保護には、Application Gateway で利用できる Web アプリケーション ファイアウォールなどをお勧めします。

Potential Benefits:

Enhanced security
Learn More:
Set up Azure App Service access restrictions

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Check if Network access restrictions defined for App service

resources
| where type =~ 'microsoft.web/sites'
| where properties.kind has 'app'
| join kind = inner
    (
    appserviceresources
    | mv-expand IpSecurityRestrictions = properties.IpSecurityRestrictions
    | where isnotnull(IpSecurityRestrictions) == true
    | project name
    ) on name
| project recommendationId = "aab6b4a4-9981-43a4-8728-35c7ecbb746d", name, id, tags, param1 = "No network restrictions set"


アプリサービスの最小インスタンス数を 2 に設定します

Impact:  Medium Category:  Scalability PG Verified:  Preview

Description:

App Service は、運用ワークロードに対して少なくとも 2 つのインスタンスで構成する必要があります。アプリのウォームアップ時間が長い場合は、少なくとも 3 つのインスタンスを使用する必要があります。

Potential Benefits:

Improves app performace
Learn More:
Ultimate guide to running healthy apps in the cloud

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Provides a list of App services that do not have minimum instance count of 2

resources
| where type =~ 'microsoft.web/sites'
| where properties.kind has 'app'
| join kind = inner
    (
    appserviceresources
    | where properties.PreWarmedInstanceCount < 2
    | project name
    ) on name
| project recommendationId = "9e6682ac-31bc-4635-9959-ab74b52454e6", name, id, tags, param1 = "PreWarmedInstanceCount is less than 2"