IoT Hub
The presented resiliency recommendations in this guidance include IoT Hub and associated resources and settings. General guidance are available in the Well-Architected Framework for IoT Reliability in your IoT workload.
Summary of Recommendations
Recommendation | Category | Impact | State | ARG Query Available |
---|---|---|---|---|
IOTH-1 - Device Identities are exported to a secondary region | Disaster Recovery | High | Preview | No |
IOTH-2 - Do not use free tier | Availability | High | Preview | Yes |
IOTH-3 - Use Availability Zones | Availability | High | Preview | No |
IOTH-4 - Use Device Provisioning Service | System Efficiency | High | Preview | Yes |
IOTH-5 - Define Failover Guidelines | Availability | High | Preview | No |
IOTH-6 - Disabled Fallback Route | Monitoring | Low | Preview | Yes |
Recommendations Details
IOTH-1 - デバイス ID をセカンダリ リージョンにエクスポートします
Category: Disaster Recovery
Impact: High
Recommendation
デバイス ID は、別の IoT Hub へのフェールオーバーが発生した場合にすべての IoT デバイスが接続できるように、フェールオーバー リージョン IoT-Hub にコピーする必要があります。
別のリージョンへの IoT Hub の手動フェールオーバーは高速 (RTO) であり、ミッション クリティカルなワークロードに使用できます。
Resources
Resource Graph Query
// cannot-be-validated-with-arg
IOTH-2 - 無料利用枠を使用しないでください
Category: Availability
Impact: High
Recommendation
運用シナリオでは、Free レベルでは必要な SLA が提供されないため、IoT Hub レベルを Free にしないでください。
Resources
Resource Graph Query
// Azure Resource Graph Query
// list all IoT Hubs that are using the Free tier
resources
| where type =~ "microsoft.devices/iothubs" and
tostring(sku.tier) =~ 'Free'
| project recommendationId="ioth-2", name, id, tags, param1=strcat("tier:", tostring(sku.tier))
IOTH-3 - 可用性ゾーンを使用します
Category: Availability
Impact: High
Recommendation
IoT Hub の Availability Zones をサポートするリージョンでは、これらのゾーンを使用して可用性を高める必要があります。Availability Zones は、サポートされているリージョン内の新しい IoT Hub に対して自動的にアクティブ化されます。
Resources
Resource Graph Query
// cannot-be-validated-with-arg
IOTH-4 - Device Provisioning Service を使用します
Category: System Efficiency
Impact: High
Recommendation
Device Provisioning Service (DPS) を使用すると、スケーリングと可用性のために IoT デバイスを簡単に再配布できます。デバイスは特定の IoT Hub インスタンスにバインドされませんが、ルールを使用して再割り当てできます。
Device Provisioning Service に関連付けられている IoT Hub でも、デバイスで使用されているかどうかを確認する必要があります。
Resources
- IoT Hub Device Provisioning Service (DPS) terminology
- Best practices for large-scale IoT device deployments
- IoT Hub Device Provisioning Service high availability and disaster recovery
Resource Graph Query
// Azure Resource Graph Query
// list all IoT Hubs that do not have a linked IoT Hub Device Provisioning Service (DPS)
resources
| where type =~ "microsoft.devices/iothubs"
| project id, iotHubName=tostring(properties.hostName), tags, resourceGroup
| join kind=fullouter (
resources
| where type == "microsoft.devices/provisioningservices"
| mv-expand iotHubs=properties.iotHubs
| project iotHubName = tostring(iotHubs.name), dpsName = name, name=iotHubs.name
) on iotHubName
| where dpsName == ''
| project recommendationId="ioth-4", name=iotHubName, id, tags, param1='DPS:none'
IOTH-5 - フェイルオーバーガイドラインを定義します
Category: Availability
Impact: High
Recommendation
リージョンで障害が発生した場合、IoT Hub は 2 番目のリージョンにフェールオーバーできます。このフェールオーバーは、自動または手動で開始できます。どちらの場合も、アプリケーションが動作し続けるには、特定の要件が必要です。フェールオーバーのガイダンスを確認ください。
- 自動フェイルオーバーの場合にRTOが一致しているかどうかを確認します
- デバイスが IoT ハブに接続するために IP アドレスは使用されません
Resources
Resource Graph Query
// cannot-be-validated-with-arg
IOTH-6 - フォールバックルートを無効化します
Category: Monitoring
Impact: Low
Recommendation
メッセージ ルーティングを使用してメッセージをカスタム エンドポイントにルーティングする場合、条件がミートでないと、メッセージがカスタム ルートに配信されないことがあります。既定のルートでは、常にすべてのメッセージが受信されます。無効にすると、メッセージが配信されない可能性があります。
Resources
Resource Graph Query
// Azure Resource Graph Query
// list all IoT Hubs that have the fallback route disabled
resources
| where type == "microsoft.devices/iothubs"
| extend fallbackEnabled=properties.routing.fallbackRoute.isEnabled
| where fallbackEnabled == false
| project recommendationId="ioth-6", name, id, tags, param1='FallbackRouteEnabled:false'