Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Azure AI Bot Service connects a bot application that you build and host to user interaction channels such as Microsoft Teams, Direct Line, and Web Chat. The service manages bidirectional communication between these channels and the application's messaging endpoint. Azure AI Bot Service doesn't host the bot application, so you're responsible for the reliability of its code, runtime, and application data.
When you use Azure, reliability is a shared responsibility. Microsoft provides a range of capabilities to support resiliency and recovery. You're responsible for understanding how those capabilities work within all of the services you use, and selecting the capabilities you need to meet your business objectives and uptime goals.
This article describes how to make a solution that uses Azure AI Bot Service resilient to various potential outages and problems, including transient faults, availability zone failures, region-wide failures, loss of encryption key access, and service maintenance. It also describes backup and restore and summarizes key information about the service-level agreement (SLA).
Production deployment recommendations for reliability
For production workloads, use the following recommendations:
Use a global deployment unless you have data residency requirements. Create a global Azure Bot resource by default. Use a regional Azure Bot resource only when you need to keep data that Azure AI Bot Service processes within a supported geographic boundary. For more information, see Regionalization in Azure AI Bot Service.
Select channels based on your reliability requirements. Premium channels have an SLA and provide zone resiliency on regional Azure Bot resources in supported regions. Standard channels don't provide either capability. Channels can also have different availability characteristics, rate limits, delivery behavior, and geographic footprints. Understand and test the behavior of every channel that your production workload uses.
Make the bot application and its state resilient. You're responsible for the bot application, its messaging endpoint, and its application state. Deploy the application on a hosting service and configuration that meets your availability requirements. If your hosting service can unload an idle application, configure it to remain available where supported, for example, by enabling Always On in Azure App Service. Ensure your application's data store supports your availability, consistency, backup, and regional recovery requirements. Maintain and test recovery procedures for your application and data stores. For more information, see Reliability architecture overview.
Make message processing resilient. Design message processing to handle transient faults; delayed, duplicate, or out-of-order activities; concurrent state updates; channel timeouts; and throttling. For more information, see Resilience to transient faults.
Monitor the complete message path. Monitor message failures, response times, and throttling across channels, Azure AI Bot Service, your application, and its dependencies. Configure alerts for failures that affect users.
Reliability architecture overview
This section describes how the service's architecture supports reliability. It introduces the logical architecture, including the resources and features that you deploy and use, and the physical architecture, including the underlying infrastructure that runs the service.
Logical architecture
The following diagram shows the main components of a bot solution.
A bot solution has three main layers:
Azure AI Bot Service: You create an Azure Bot resource to register your bot application with Azure AI Bot Service and configure its channel connections and messaging endpoint. The resource stores the bot registration and channel configuration. Azure AI Bot Service manages bidirectional communication between each channel and the bot application's messaging endpoint.
Azure AI Bot Service supports two deployment types: global and regional. Use a global deployment unless you have specific requirements to keep data that Azure AI Bot Service processes within a supported geographic boundary. For more information, see Regionalization in Azure AI Bot Service.
Interaction channels: A user interacts through a channel, such as Microsoft Teams, Direct Line, or Web Chat. Each channel has its own availability characteristics, limits, data-handling behavior, and reliability guarantees.
Azure AI Bot Service classifies channels as standard or premium:
- Standard channels: Connect your bot to services such as Microsoft Teams, Facebook, and Slack.
- Premium channels: Connect your bot to users in your own application or website through Direct Line or Web Chat. Direct Line Speech and Direct Line App Service Extension also use the premium billing class.
Direct Line App Service Extension runs in your App Service and connects clients directly to that host. The service-managed zone resilience and multiregion routing described for premium channels in this article don't apply to the extension's message path. You're responsible for configuring its hosting and routing for resilience. For more information, see Reliability in Azure App Service.
The other named, hosted channels in the channels list use the standard billing class. Channel classification doesn't change preview, restricted-access, or retirement limitations. Channel providers and other Azure services can apply separate charges.
For more information, see Azure AI Bot Service pricing and the channels list.
Bot application and dependencies: You host the application in Azure, such as on Azure App Service or Azure Functions, or on your own on-premises infrastructure. The application can use identities, secrets, external state stores, Azure services, custom APIs, databases, and third-party systems. You're responsible for the reliability of the application and these dependencies.
Azure AI Bot Service doesn't host your application code or provide durable storage for your application's conversation and user state. The framework that you use to implement a bot is separate from the Azure Bot resource. You can build the application by using the Microsoft 365 Agents SDK or another approach that implements Azure AI Bot Service messaging and authentication requirements.
If your bot needs to retain conversation or user state across turns, store that state in persistent external storage rather than in-process memory. For production workloads, use a persistent store such as Azure Blob Storage, Azure Cosmos DB, or another data store that meets your availability, consistency, backup, and regional recovery requirements.
The location of the bot application is independent of the Azure Bot resource.
Physical architecture
Microsoft manages the infrastructure that runs Azure AI Bot Service based on its deployment type. Global deployments use a Microsoft-managed multiregion footprint. Regional deployments restrict service data processing to the selected geographic boundary. The deployment type affects how the service protects against infrastructure failures. For more information, see Resilience to availability zone failures and Resilience to region-wide failures.
Azure AI Bot Service stores the bot resource configuration, including channel configuration, credentials, and the messaging endpoint. The service also temporarily stores limited state for active conversations. It retains messages sent through some channels, such as Direct Line and Web Chat, and uploaded attachments for less than 24 hours. This transient storage helps the service process active interactions, but it isn't intended as long-term storage or an application system of record. For more information, see Azure AI Bot Service encryption for data at rest.
Azure AI Bot Service encrypts persisted service data with Microsoft-managed keys by default. You can configure a customer-managed key in Azure Key Vault to add another encryption layer for longer-term service data. Transiently stored data continues to use Microsoft-managed keys. For more information about the availability dependency that customer-managed keys introduce, see Resilience to loss of encryption key access.
Resilience to transient faults
Transient faults are short, intermittent failures in components. They occur frequently in a distributed environment like the cloud, and they're a normal part of operations. Transient faults correct themselves after a short period of time. It's important that your applications can handle transient faults, usually by retrying affected requests.
All cloud-hosted applications should follow the Azure transient fault handling guidance when they communicate with any cloud-hosted APIs, databases, and other components. For more information, see Recommendations for handling transient faults.
Activities travel from a channel through Azure AI Bot Service to your application's messaging endpoint and back. You're responsible for handling transient faults in your application's communication with the service and its downstream dependencies. Your application also needs to process activities correctly when they're delayed, duplicated, retried, or delivered out of order.
Channel timeouts and acknowledgments
When Azure AI Bot Service delivers a message activity to your messaging endpoint, your application acknowledges it with HTTP status code 200. On most channels, the application has 10 to 15 seconds to acknowledge the activity. If the application doesn't respond in time, Azure AI Bot Service returns HTTP status code 504 to the client.
For message activities that support asynchronous replies, move long-running processing to a queue or another asynchronous process so that the application can acknowledge the original activity within the channel timeout. Send the result as a later activity. The acknowledgment and the message that contains the result are separate operations. For more information about this communication pattern, see Basics of the Microsoft Bot Framework.
Some activities require a synchronous response and have additional requirements, such as Microsoft Teams Adaptive Card actions. Review the invoke-response requirements for Universal Actions for Adaptive Cards before using asynchronous replies.
Retry behavior depends on the channel and delivery path. For example, the email channel can resend an activity if the application doesn't acknowledge it within 15 seconds. Microsoft Teams can also retry an activity that takes more than 15 seconds to process. These retries don't guarantee that every interrupted activity is retried after an outage. Acknowledge activities within the channel timeout, and handle duplicate delivery by following the guidance in Message-processing correctness.
Retries and throttling
For requests that your application sends to Azure AI Bot Service, use bounded exponential backoff for HTTP 408, 429, and 5xx responses when the operation is safe to retry. This retry handling is separate from any channel-managed retries of activities delivered to your application.
Account for limits at both the service and channel layers:
Azure AI Bot Service limits: When the service returns HTTP status code 429, wait for the duration in the
Retry-Afterheader before you retry. Azure AI Bot Service doesn't publish fixed rate-limit thresholds because they can change. For more information, see Rate limiting in Azure AI Bot Service.Channel-specific limits: Each channel can apply its own rate limits and retry guidance in addition to Azure AI Bot Service limits. For example, Microsoft Teams has published rate limits and recommends exponential backoff with random jitter after an HTTP 429 response. Review and test the limits for every channel that your application uses.
Message-processing correctness
Design message processing so that interruptions and retries don't cause incorrect state transitions or duplicate side effects:
Idempotency: Use activity identifiers or application-level operation identifiers to detect duplicate activities and avoid repeating side effects. Design asynchronous queue consumers for duplicate delivery. For techniques that help make repeated processing safe, see the Idempotent Consumer pattern.
Concurrency: Use optimistic concurrency controls, such as ETags, when multiple activities can update the same state.
Ordering: Don't rely on a channel, including Microsoft Teams or Slack, to guarantee end-to-end message order. Azure AI Bot Service preserves message order as much as possible. Wait for each send operation to complete successfully before starting the next, but don't treat this sequence as a guarantee of ordered receipt or processing. If your application requires ordered processing, sequence and serialize work for each conversation across application instances. Handle delayed activities, duplicate deliveries, and retries. For more information, see Message delivery order in Azure AI Bot Service.
Application dependencies
You're responsible for the reliability of your application and the dependencies that you select and configure. Azure AI Bot Service doesn't manage communication between your application and those dependencies, so you're responsible for handling transient faults on those paths.
Apply timeouts, bounded retries, and circuit breakers to calls from your application to state stores, AI models, and other dependencies. A slow or unavailable dependency shouldn't exhaust the application's request-processing capacity or prevent it from meeting the channel acknowledgment timeout.
Resilience to availability zone failures
Availability zones are physically separate groups of datacenters within an Azure region. When one zone fails, services can fail over to one of the remaining zones.
In specific Azure regions, Azure AI Bot Service provides zone resilience for premium channels that you configure on regional Azure Bot resources. Microsoft distributes the infrastructure that manages these premium channels across multiple availability zones and handles zone failures.
Global Azure Bot resources use Microsoft-managed multiregion resilience instead of availability zone resilience. For more information, see Resilience to region-wide failures.
Important
Availability zone support for Azure AI Bot Service covers the Azure Bot resource and its premium channel integrations. It doesn't cover the bot application that you build and host or the application's dependencies. Configure the application's hosting service, state stores, and other regional dependencies for zone resilience by following the reliability guidance for each service.
Requirements
Deployment type: Availability zone resilience applies only to regional Azure Bot resources. Global Azure Bot resources use Microsoft-managed multiregion resilience instead.
Region support: Currently, premium channels on regional Azure Bot resources provide zone resilience in West Europe only.
Channel support: Only premium channels on regional Azure Bot resources provide zone resilience. Standard channels on these resources don't provide zone resilience. If an availability zone is unavailable, these standard channels might be unavailable and messages to your bot application might not be processed.
Deployments without zone redundancy can still benefit from cross-region routing when the channel has healthy endpoints in another region. A zone failure that makes an endpoint unavailable might cause subsequent connections to use another region. This protection depends on the channel, geography, and availability of its dependencies, and it doesn't guarantee recovery of existing conversations. WebSocket clients need to reconnect, and failed requests might need retries. Cross-region routing is separate from zone redundancy. For coverage and limitations, see Resilience to region-wide failures.
Cost
There's no additional charge for zone resilience on supported regional Azure Bot resources. For more information, see Azure AI Bot Service pricing.
Configure availability zone support
When you configure a premium channel on a regional Azure Bot resource in a supported region, Microsoft provides zone resilience automatically. You don't enable it separately.
Behavior when all zones are healthy
This section describes what to expect when you use premium channels on a regional Azure Bot resource in a supported region and all availability zones that the service uses are operational.
Cross-zone operation: Microsoft manages premium channel infrastructure across multiple availability zones and automatically routes traffic among those zones.
Cross-zone data replication: Azure AI Bot Service replicates service-maintained state across availability zones by using a combination of synchronous and asynchronous replication.
Behavior during a zone failure
This section describes what to expect when you use premium channels on a regional Azure Bot resource in a supported region and there's an outage in one of the availability zones that the service uses.
- Detection and response: Microsoft detects a zone failure and manages the response by using premium channel infrastructure in healthy zones. You don't need to initiate this response.
- Notification: Microsoft doesn't automatically notify you when a zone is down. However, you can use Azure Service Health to understand the overall health of the service, including any zone failures, and you can set up Service Health alerts to notify you of problems.
Active requests: Requests that are in progress when a zone fails can fail or time out. Service recovery doesn't guarantee replay of every interrupted request. Follow the retry guidance for the channel and API, and make application operations safe to repeat. For more information, see Resilience to transient faults.
Expected data loss: Some service-maintained state might be lost during a zone failure because not all state replicates synchronously. Interrupted activities aren't guaranteed to be preserved or replayed. You're responsible for protecting your application's durable data separately.
Expected downtime: You might experience a brief interruption or performance degradation while Azure AI Bot Service redistributes processing to healthy zones. Design your application to handle these interruptions by following the guidance in Resilience to transient faults.
Resource management and messaging can be affected differently. Your bot might continue exchanging messages while resource management operations are unavailable or configuration changes are delayed.
Redistribution: Microsoft manages the redistribution of premium channel processing to infrastructure in healthy zones.
Zone recovery
Microsoft manages zone recovery and restores normal service distribution. You don't initiate recovery or failback.
Test for zone failures
You can't initiate an availability zone failure for Azure AI Bot Service. Microsoft manages zone distribution and recovery, so you don't need to validate the service-managed process. Test the zone resilience of your bot application, state stores, and other dependencies separately.
Resilience to region-wide failures
Azure AI Bot Service provides Microsoft-managed multiregion routing for global resources and supported regional channel deployments.
Microsoft-managed multiregion operation
Microsoft manages the service's cross-region distribution. Where a channel has endpoints in multiple regions, health-based routing can direct subsequent connections to a healthy endpoint during a region failure. You don't need to initiate a failover, but routing doesn't guarantee uninterrupted messaging or recovery of every existing conversation, and coverage depends on the channel and geography.
This built-in multiregion behavior applies to Azure AI Bot Service. You design cross-region resilience for your application hosting and dependencies separately from the service's built-in multiregion support.
Requirements
Resource location: Global Azure Bot resources include Microsoft-managed multiregion routing by default.
For regional Azure Bot resources, multiregion routing covers premium and some standard-channel endpoints within the selected geographic boundary (Europe or India). Regional coverage differs by channel and geography.
Third-party channels depend on their provider's availability.
Cost
There's no separate charge for Microsoft-managed multiregion operation. Your bot application, network traffic, channel providers, and dependent services can incur their usual charges. For more information, see Azure AI Bot Service pricing.
Configure multiregion support
You don't enable or configure Microsoft-managed multiregion routing. When you create an Azure Bot resource, select either the global option or a supported regional option based on your data residency requirements. Microsoft manages the service's multiregion infrastructure, subject to the channel and geographic coverage described in Requirements.
Behavior when all regions are healthy
This section describes what to expect when you use a global or regional Azure Bot resource and all regions that the service uses are operational.
Cross-region operation: Where Microsoft-managed multiregion routing is available, Microsoft routes connections to healthy service infrastructure.
For global Azure Bot resources, the healthy region can be anywhere in the global service footprint.
For regional Azure Bot resources, the service uses infrastructure within the resource's data residency boundary. Whether a channel has endpoints in multiple regions depends on the coverage described in Requirements.
Cross-region data replication: Regional metadata databases use asynchronous cross-region replication. Replication and caching mean that requests handled by another service instance or region can read older metadata.
Behavior during a region failure
This section describes what to expect when you use a global or regional Azure Bot resource and there's an outage in one of the regions that the service uses.
- Detection and response: Microsoft manages health-based routing. Where another healthy regional endpoint is available, the service can route subsequent connections to it. You don't initiate failover. Existing connections might need to reconnect, and affected regional dependencies can prevent some conversations or features from recovering.
- Notification: Microsoft doesn't automatically notify you when a region is down. However, you can use Azure Service Health to understand the overall health of the service, including any region failures, and you can set up Service Health alerts to notify you of problems.
Active requests: A region failure can interrupt activities, and there's no service-wide guarantee of automatic queuing or replay. Delivery to your bot depends on the channel and transport. Some paths use persistent queues or bounded retries, while others can lose unfinished work. Some channels might retry a request that was not acknowledged, according to their own policy.
For requests from your application to Azure AI Bot Service, handle transient errors and timeouts in your application or client SDK. Service-side retries of some downstream operations don't replay every failed or unanswered application request. A missing response doesn't prove that an activity wasn't processed, and a successful response indicates channel-specific acceptance, not necessarily delivery to or consumption by the user. Follow the guidance in Resilience to transient faults.
Expected data loss: Don't assume zero data loss during a region failure. Recent metadata changes might not have replicated to a surviving region. Activity delivery has separate recovery behavior, and interrupted activities can have uncertain outcomes.
Expected downtime: Recovery time can vary. The interruption time depends on many factors including the affected endpoint, DNS caching, failure detection, connection behavior, surviving state, and other dependencies. New requests can use a healthy target in another region after routing changes finish propagating, but existing conversations and features can remain interrupted.
Resource management and messaging can recover at different times. Your bot might exchange messages while resource management operations remain unavailable or configuration changes are delayed.
Your bot application and its dependencies need their own recovery plan.
Redistribution: Where the channel has another healthy endpoint, Microsoft-managed routing directs subsequent connections to it.
For regional Azure Bot resources, routing remains within the selected data residency boundary.
Region recovery
Microsoft manages region recovery and restores normal service distribution. You don't initiate recovery or failback.
Test for region failures
You can't initiate a region failure for Azure AI Bot Service. Microsoft manages regional distribution and recovery, so you don't need to validate the service-managed process. Test the regional resilience and recovery procedures for your bot application, state stores, and other dependencies separately.
Resilience to loss of encryption key access
Azure AI Bot Service lets you use a customer-managed key to encrypt longer-term service data. If you enable this feature, your bot's availability depends on the service retaining access to the key, which you store in Azure Key Vault.
If Azure AI Bot Service loses access to the key, the bot can't send or receive messages, and you can't access or edit its configuration in the Azure portal. Microsoft can't recover a bot that uses customer-managed encryption without access to the key.
You're responsible for protecting the key and maintaining the service's access to it. Enable soft delete and purge protection on the key vault, protect the key from accidental deletion, and monitor key expiration and changes to access permissions. Review the key vault's redundancy and recovery capabilities as part of your reliability design.
Before you revoke the service's access to the key, disable the customer-managed keys feature and verify that the change has completed.
For more information, see Customer-managed keys with Azure Key Vault and Reliability in Azure Key Vault.
Backup and restore
Azure AI Bot Service doesn't provide a customer-accessible backup and restore feature for its temporarily stored messages and conversation-routing state.
Preserve your Azure Bot resource and channel configuration in infrastructure as code where the service supports it. Store deployment definitions in source control, and maintain a protected inventory of any channel settings that you must recreate manually. After accidental deletion or configuration loss, redeploy the supported configuration from those definitions and recreate any settings that require manual configuration. Don't store secret values in infrastructure templates or recovery documentation.
You're responsible for backing up and restoring your bot application's code, configuration, conversation state, user state, and other application data. Use the backup and recovery features of the services that host this data, and test restoration as part of your workload recovery plan.
Resilience to service maintenance
Microsoft regularly applies service updates and performs other maintenance. The Azure platform handles these activities automatically, ensuring that maintenance is seamless and transparent to you. No downtime is expected during maintenance events unless you've been advised through Azure Service Health planned maintenance.
Service-level agreement
The service-level agreement (SLA) for Azure services describes the expected availability of each service and the conditions that your solution must meet to achieve that availability expectation. For more information, see SLAs for online services.
The availability SLA for Azure AI Bot Service applies only to premium channels.