Service Bus


The presented resiliency recommendations in this guidance include Service Bus and associated resources and settings.

Summary of Recommendations

Recommendations Details

SBNS-1 - Enable Availability Zones for Service Bus namespaces

Category: Availability

Impact: High

Guidance

Use Service Bus with zone redundancy for production workloads. The Service Bus Premium SKU supports availability zones, providing fault-isolated locations within the same Azure region. Service Bus manages three copies of the messaging store (1 primary and 2 secondary). Service Bus keeps all three copies in sync for data and management operations. If the primary copy fails, one of the secondary copies is promoted to primary with no perceived downtime. If the applications see transient disconnects from Service Bus, the retry logic in the SDK will automatically reconnect to Service Bus.

Resources

Resource Graph Query

// Azure Resource Graph Query
// Returns Service Bus namespaces that do not have any availability zones enabled
resources
| where type =~ 'Microsoft.ServiceBus/namespaces'
| where properties.zoneRedundant == 'false'
| project recommendationId = "sbns-1", name, id, tags, param1=strcat("zoneRedundant: ", properties.zoneRedundant), param2=strcat("SKU: ", sku.name), param3=iff(tolower(sku.name) == 'premium', 'Move Service Bus namespace to a region that supports Availability Zones', 'Migrate to Premium SKU in a region that supports Availability Zones')