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

loadBalancers

Summary

RecommendationImpactCategoryAutomation AvailablePG Verified
標準ロード バランサー SKU を使用するHighHigh AvailabilityYesVerified
バックエンド プールに少なくとも 2 つのインスタンスが含まれていることを確認してくださいHighHigh AvailabilityYesVerified
運用ワークロードのアウトバウンド ルールの代わりに NAT ゲートウェイを使用するMediumHigh AvailabilityYesVerified
Standard Load Balancer がゾーン冗長であることを確認するHighHigh AvailabilityYesVerified
ヘルスプローブを使用してバックエンドインスタンスの可用性を検出するHighMonitoring and AlertingYesVerified

Details


標準ロード バランサー SKU を使用する

Impact:  High Category:  High Availability PG Verified:  Verified

Description:

Standard SKU ロード バランサーを選択すると、可用性ゾーンとゾーンの復元力を通じて信頼性が向上し、ゾーンとリージョンの障害に耐えられる展開が保証されます。 Basic とは異なり、グローバル負荷分散をサポートし、SLA を提供します。

Potential Benefits:

Enhanced reliability and SLA support
Learn More:
Reliability and Azure Load Balancer
Resiliency checklist for specific Azure services- Azure Load Balancer

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Find all LoadBalancers using Basic SKU
resources
| where type =~ 'Microsoft.Network/loadBalancers'
| where sku.name == 'Basic'
| project recommendationId = "38c3bca1-97a1-eb42-8cd3-838b243f35ba", name, id, tags, Param1=strcat("sku-tier: basic")



バックエンド プールに少なくとも 2 つのインスタンスが含まれていることを確認してください

Impact:  High Category:  High Availability PG Verified:  Verified

Description:

バックエンドに少なくとも 2 つのインスタンスを含む Azure Load Balancer をデプロイすると、単一障害点が防止され、スケーラビリティがサポートされます。最適なスケールを構築するには、仮想マシン スケール セットとペアリングすることをお勧めします。

Potential Benefits:

Enhances reliability and scalability
Learn More:
Resiliency checklist for specific Azure services- Azure Load Balancer

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Find all LoadBalancers which only have 1 backend pool defined or only 1 VM in the backend pool
resources
| where type =~ 'Microsoft.Network/loadBalancers'
| extend bep = properties.backendAddressPools
| extend BackEndPools = array_length(bep)
| where BackEndPools == 0
| project recommendationId = "6d82d042-6d61-ad49-86f0-6a5455398081", name, id, Param1="backendPools", Param2=toint(0), tags
| union (resources
  | where type =~ 'Microsoft.Network/loadBalancers'
  | where sku.name == "Standard"
  | extend bep = properties.backendAddressPools
  | extend BackEndPools = toint(array_length(bep))
  | mv-expand bip = properties.backendAddressPools
  | extend BackendAddresses = array_length(bip.properties.loadBalancerBackendAddresses)
  | where toint(BackendAddresses) <= 1
  | project recommendationId = "6d82d042-6d61-ad49-86f0-6a5455398081", name, id, tags, Param1="backendAddresses", Param2=toint(BackendAddresses))
| union (
  resources
  | where type =~ 'Microsoft.Network/loadBalancers'
  | where sku.name == "Basic"
  | mv-expand properties.backendAddressPools
  | extend backendPoolId = properties_backendAddressPools.id
  | project id, name, tags, tostring(backendPoolId), recommendationId = "6d82d042-6d61-ad49-86f0-6a5455398081", Param1="BackEndPools"
  | join kind = leftouter (
  resources
  | where type =~ "Microsoft.Network/networkInterfaces"
  | mv-expand properties.ipConfigurations
  | mv-expand properties_ipConfigurations.properties.loadBalancerBackendAddressPools
  | extend backendPoolId = tostring(properties_ipConfigurations_properties_loadBalancerBackendAddressPools.id)
  | summarize poolMembers = count() by backendPoolId
  | project tostring(backendPoolId), poolMembers ) on backendPoolId
  | where toint(poolMembers) <= 1
  | extend BackendAddresses = poolMembers
  | project id, name, tags, recommendationId, Param1="backendAddresses", Param2=toint(BackendAddresses))


運用ワークロードのアウトバウンド ルールの代わりに NAT ゲートウェイを使用する

Impact:  Medium Category:  High Availability PG Verified:  Verified

Description:

標準パブリック ロード バランサーのアウトバウンド ルールには、バックエンド プールへの手動ポート割り当てが含まれており、スケーラビリティと SNAT ポート枯渇のリスクが制限されます。 NAT ゲートウェイは、動的スケーリングと安全なインターネット接続のために推奨されます。

Potential Benefits:

Enhanced scalability and reliability
Learn More:
Resiliency checklist for specific Azure services- Azure Load Balancer

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Find all LoadBalancers with Outbound rules configured
resources
| where type =~ 'Microsoft.Network/loadBalancers'
| extend outboundRules = array_length(properties.outboundRules)
| where outboundRules > 0
| project recommendationId = "8d319a05-677b-944f-b9b4-ca0fb42e883c", name, id, tags, Param1 = "outboundRules: >=1"



Standard Load Balancer がゾーン冗長であることを確認する

Impact:  High Category:  High Availability PG Verified:  Verified

Description:

可用性ゾーンのあるリージョンでは、ゾーン冗長フロントエンド IP を Standard Load Balancer に割り当てることで、1 つの可用性ゾーンに障害が発生した場合でも、他の正常なゾーンとバックエンドインスタンスがトラフィックを受信できる場合に限り、継続的なトラフィック分散が保証されます。

Potential Benefits:

Enhances uptime and resilience
Learn More:
Load Balancer and Availability Zones

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Find all LoadBalancers with with regional or zonal public IP Addresses
resources
| where type == "microsoft.network/loadbalancers"
| where tolower(sku.name) != 'basic'
| mv-expand feIPconfigs = properties.frontendIPConfigurations
| extend
    feConfigName = (feIPconfigs.name),
    PrivateSubnetId = toupper(feIPconfigs.properties.subnet.id),
    PrivateIPZones = feIPconfigs.zones,
    PIPid = toupper(feIPconfigs.properties.publicIPAddress.id),
    JoinID = toupper(id)
| where isnotempty(PrivateSubnetId)
| where isnull(PrivateIPZones) or array_length(PrivateIPZones) < 2
| project name, feConfigName, id
| union (resources
    | where type == "microsoft.network/loadbalancers"
    | where tolower(sku.name) != 'basic'
    | mv-expand feIPconfigs = properties.frontendIPConfigurations
    | extend
        feConfigName = (feIPconfigs.name),
        PIPid = toupper(feIPconfigs.properties.publicIPAddress.id),
        JoinID = toupper(id)
    | where isnotempty(PIPid)
    | join kind=innerunique (
        resources
        | where type == "microsoft.network/publicipaddresses"
        | where isnull(zones) or array_length(zones) < 2
        | extend
            LBid = toupper(substring(properties.ipConfiguration.id, 0, indexof(properties.ipConfiguration.id, '/frontendIPConfigurations'))),
            InnerID = toupper(id)
    ) on $left.PIPid == $right.InnerID)
| project recommendationId = "621dbc78-3745-4d32-8eac-9e65b27b7512", name, id, tags, param1="Zones: No Zone or Zonal", param2=strcat("Frontend IP Configuration:", " ", feConfigName)



ヘルスプローブを使用してバックエンドインスタンスの可用性を検出する

Impact:  High Category:  Monitoring and Alerting PG Verified:  Verified

Description:

正常性プローブは、バックエンド エンドポイントの状態を判断するために Azure Load Balancer によって使用されます。ベンダーの推奨事項に沿ったカスタム正常性プローブを使用すると、バックエンドの可用性についての理解が深まり、バックエンド サービスの影響の監視が容易になります。

Potential Benefits:

Ensures backend uptime monitoring.
Learn More:
Load Balancer Health Probe Overview

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// List the load balancers which don't have health probe configured
resources
| where type =~ "microsoft.network/loadbalancers"
| where array_length(properties.probes) == 0
| project recommendationId="e5f5fcea-f925-4578-8599-9a391e888a60", name, id, tags, param1="customHealthProbeUsed: false"