Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Chaos Studio is a managed service that helps you run controlled resilience tests by injecting faults into some of the Azure resources that your workload uses. You can use these tests to assess how your solution responds to problems and outages.
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 Azure Chaos Studio and its Scenarios behave during real outages, including transient faults, availability zone failures, and region-wide failures. It also describes service maintenance and options for backup and restore.
Note
This article covers only Chaos Studio Workspaces and Scenarios, the recommended resource model for Chaos Studio. It doesn't cover Experiments (classic).
Important
This article focuses on the reliability of the Chaos Studio service itself and the configuration choices that affect it. It doesn't describe how to use Chaos Studio to test the resilience of your applications or other Azure services.
Chaos testing and chaos engineering can help you assess your solution's resilience, identify gaps, and plan improvements. For more information, see Chaos engineering and resilience in Azure.
Production deployment recommendations for reliability
The following recommendations are a starting point for planning reliable use of Chaos Studio.
Workspace placement: A Workspace can target resources in any Azure region. If you deploy it in a different region from your targets, consider that an outage in the Workspace's region could prevent Chaos Studio from managing or reverting an in-progress run, even if the region that hosts the targets remains healthy. For more information, see Resilience to region-wide failures.
Test environment: First, test against nonproduction resources where testing can't affect real user traffic. Address the findings before considering production testing. Test production resources only after you adequately control the risks.
Identity permissions: Grant the Workspace's managed identity only the roles and scope needed to run your tests. For more information, see Permissions and identity in Chaos Studio Workspaces.
Cancellation: Before you start a Scenario run, ensure that your operators have the permissions and procedures they need to request cancellation.
Recovery: Plan how to undo each disruption and return affected resources to their intended state. Review each Action's cleanup behavior and restoration parameters. If an Action doesn't undo its changes, plan any additional Actions or recovery procedures needed to restore the resource. Prepare recovery runbooks that you can invoke independently of the Workspace if its region becomes unavailable. Test recovery in a nonproduction environment, and verify the state of affected resources after each run. For Action-specific behavior, see Supported resources and Actions for Chaos Studio Workspaces.
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
You configure resilience tests as Scenarios within a Workspace and execute them through Scenario runs.
Resource model
The top-level resource that you deploy is a Workspace. It contains your Chaos Studio configuration and the Scenarios that you configure and run. Microsoft manages the underlying Chaos Studio service. You're responsible for configuring the Workspace and controlling which resources it can affect. For more information, see Chaos Studio Workspaces overview.
A Workspace uses the following components:
Scope: A Workspace's scope defines the set of Azure resources it can discover and target for testing. You select an Azure subscription, resource group, or service group. A service group groups resources for a workload across resource groups and subscriptions without changing their existing resource hierarchy.
Workspace managed identity: A managed identity lets Chaos Studio authenticate to your Azure resources and perform the operations you authorize. You grant the identity the permissions needed to make changes during a test and restore affected resources afterward, and these permissions determine which resources the service can affect.
Scope determines which resources are available for testing. The Workspace's identity permissions determine which operations it can perform against those resources. For more information, see Permissions and identity in Chaos Studio Workspaces.
Scenarios: A Scenario defines a resilience test. You can use built-in Scenario templates or create custom Scenarios by selecting and configuring Actions from the catalog. You're responsible for choosing the test, its target resources, and its configuration. For more information, see Scenarios and outage templates for Chaos Studio Workspaces.
Tip
Scenarios should focus on your solution's behavior, not on validating Microsoft's implementation of platform resiliency features, such as a managed service's internal zone redundancy.
Actions: An Action performs an operation against a target resource as part of a Scenario. For example, an Action might shut down a virtual machine or change a network configuration to disrupt connectivity. You select and configure the Actions in a custom Scenario. Chaos Studio executes them by using the permissions that you grant to the Workspace's managed identity. An Action's type and parameters determine whether and how it stops its effect or restores resource state, as described in How Scenarios run.
You can include your own logic by using the Start runbook Action to run an Azure Automation runbook, which contains automation code that you write and maintain. The Zone Down Scenario also supports runbooks.
Scenario runs and reports: A Scenario run is an execution of a Scenario definition. Each completed run has an overall status of Succeeded, Failed, or Canceled. Its Scenario report records the run's outcome and metadata, including timing, the status of individual Actions, and the resources they targeted. Use the report to identify which resources to check after a run. You're responsible for reviewing the report alongside application monitoring and checks of the affected resources' state to assess recovery. A successful run doesn't by itself prove that your application was resilient or that it recovered from the simulated fault. For more information, see Scenario reports in Chaos Studio Workspaces.
How Scenarios run
Service-direct Actions use Azure management APIs to change the configuration or state of target resources. Other Actions use the Chaos Studio agent to introduce faults inside one or more target virtual machines. Chaos Studio installs the agent extension when needed and leaves it installed after the run. For more information, see Agent-based Scenario requirements.
For pod-level faults in Azure Kubernetes Service (AKS), you install the Chaos Studio extension for AKS in your cluster. The extension runs faults inside the cluster. For more information, see Chaos Studio extension for AKS overview.
Check the state of your environment after a Scenario and its Actions complete. Cleanup behavior depends on each Action's type and parameters. Some Actions stop their effects automatically, while others leave changes that you need to undo through a later Action or a recovery procedure. You can configure a later restoration Action to run after an earlier Action fails. For more information, see Action types and Scenario structure.
Canceling a Scenario run is a long-running operation. Cancellation isn't a rollback. Depending on the Action, cancellation might stop an ongoing fault, leave changes in place, or fail to stop an operation that's already been dispatched. Don't assume that a failed or canceled run status proves that all affected resources have returned to their intended state. You're responsible for verifying recovery of your resources after a Scenario run completes.
A key reliability consideration is whether you can stop a test and restore affected resources when Chaos Studio itself experiences an outage. The zone failure and region-wide failure sections describe those dependencies.
Physical architecture
Microsoft deploys and manages the infrastructure that handles Chaos Studio configuration and initiates and orchestrates Scenario runs. Scenario runs execute on durable workflows, which save execution progress and use retries to resume after supported interruptions. Resuming a run doesn't guarantee that each operation against a target resource takes effect exactly once. Microsoft stores Workspace and Scenario definitions, run data, and results in service-managed storage. You don't deploy or maintain this underlying service infrastructure.
The AKS extension communicates with Chaos Studio's data plane, the Microsoft-managed service component that delivers Actions to the extension. This data plane runs in the Workspace's region, not the cluster's region. Scenario orchestration and the Chaos Studio agent endpoint also run only in the Workspace's region, with no regional failover. The agent connects to this endpoint even when the target virtual machine is in a different region.
The resources that Scenarios test remain within your management boundary. You're responsible for their configuration, operation, and recovery from changes made during testing. For agent-based Scenarios, the agent runs within your target virtual machine.
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.
Chaos Studio uses workflow retries to recover Scenario run orchestration from supported interruptions.
Consider the following potential faults in Chaos Studio operations separately from the faults that a Scenario intentionally introduces into your resources:
Management operation failures: Chaos Studio management operations, including starting and canceling Scenario runs, use Azure resource management APIs. If you invoke these operations from scripts or automation, handle transient failures by using bounded retries with exponential backoff. Before retrying an operation that might have succeeded despite an error response, check its result or the Scenario run status to avoid unintentionally starting another run.
Target API throttling and transient errors: Service-direct Actions call the target resource's Azure Resource Manager or service API by using the Workspace's managed identity. The target service's throttling limits and transient errors can affect the Action's result. Service-direct Actions retry transient errors, including throttling, up to a limit, with a fixed delay between attempts. Retry behavior varies by Action.
Action failures: An Action can succeed, fail, or be skipped. A failed Action encountered an error, but its reported status might not establish whether it changed the target resource. Use the Scenario report to identify the resources the Action targeted, and check their state to determine what recovery is needed. For more information, see Action summary.
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 supported regions, Azure Chaos Studio is automatically zone redundant. Microsoft distributes the infrastructure that manages service configuration, Scenarios, and Scenario runs across multiple availability zones.
This zone redundancy protects the Chaos Studio Workspace itself, including control operations such as starting and canceling Scenario runs. It doesn't describe the zone resilience of the resources under test. Those resources have their own availability zone configurations and might be in different regions. You're responsible for the resilience of those resources independently of the Workspace's zone redundancy.
Requirements
Region support: To use zone redundancy, deploy your Workspace in a region that supports both Chaos Studio Workspaces and availability zones. Check Regional availability of Azure Chaos Studio and compare it with the list of Azure regions that support availability zones.
Cost
There's no additional cost for zone redundancy.
Configure availability zone support
In a supported region, Chaos Studio enables zone redundancy by default. You don't need to configure it or manage capacity for zone redundancy.
Behavior when all zones are healthy
This section describes what to expect when your Workspace is zone redundant and all availability zones are operational.
Cross-zone operation: Microsoft automatically manages the distribution of work across the availability zones that your Workspace uses. You don't configure or manage this distribution.
Cross-zone data replication: Chaos Studio stores all service data, including Workspace and Scenario definitions, run data, and results, in zone-redundant storage.
Behavior during a zone failure
This section describes what to expect when your Workspace is zone redundant and an availability zone in its region becomes unavailable.
Detection and response: Microsoft detects availability zone failures and manages the service's response. You don't initiate failover of the Workspace infrastructure.
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 to manage a Workspace or start or cancel a Scenario run might encounter transient failures during a zone outage. Follow transient fault handling guidance, and check an operation's result before retrying it. Run progress is zone resilient, so running Scenarios can continue after a zone failure, but they might encounter errors or disruptions.
Expected data loss: No loss of Chaos Studio data is expected during a zone outage.
Data protection for the resources under test depends on their own service capabilities and configuration.
Expected downtime: You might experience a brief degradation in Chaos Studio performance and availability while the service transitions to infrastructure in functioning zones. Recovery doesn't depend on restoration of the affected zone because Microsoft uses infrastructure in other zones. The service shouldn't experience a complete outage.
Redistribution: Chaos Studio automatically redistributes Workspace functionality to infrastructure in healthy availability zones.
Zone recovery
Microsoft manages zone recovery and reintegrates infrastructure in the recovered zone as required. You don't initiate or manage this process.
Test for zone failures
Microsoft manages testing of Chaos Studio's resilience to zone failures. You can't use Chaos Studio to simulate a zone failure in the infrastructure that runs Chaos Studio itself. This limitation is separate from using Scenarios to test how your own resources respond to simulated failures.
Resilience to region-wide failures
Chaos Studio is a single-region service and doesn't provide automatic cross-region recovery.
If your Workspace's region becomes unavailable, you can't manage Scenarios, start Scenario runs, view runs, or cancel runs through that Workspace. This dependency also applies when a Scenario targets resources in other regions that remain healthy. An extended region outage can leave a Scenario run expired and incomplete.
Some Scenarios normally restore affected resources when the run ends. For example, VM Hibernate resumes hibernated virtual machines, and Event-Driven Messaging Disruption re-enables affected Azure Service Bus queues and Azure Event Hubs entities. If the Chaos Studio region goes down mid-run, injected faults could remain in place.
AKS extension faults end on their own inside the cluster after their configured duration, even if the Workspace's region is unavailable. VM agent-based and service-direct faults don't expire independently on the target. Their service-managed cleanup or restoration requires Chaos Studio to be available.
Prepare and test recovery runbooks for the faults that you use. Ensure that operators can invoke them independently of the affected Workspace. For example, a runbook might remove an injected network security group rule or restart a virtual machine. Don't rely only on restoration Actions in the interrupted Scenario. This recommendation is particularly important when you use Chaos Studio to test production environments.
Custom multiregion solutions for resiliency
You can deploy a second Chaos Studio Workspace in another supported Azure region by using infrastructure as code. You're responsible for configuring that Workspace, its Scenarios, scope, and identity permissions. For information about preserving your configuration, see Backup and restore.
Each Workspace can run its own Scenarios, but Workspaces don't take over each other's runs. For example, a Workspace in region B can't take over or cancel a run that a Workspace in region A started. Deploying a second Workspace doesn't recover an interrupted run or automatically undo its effects on target resources.
Backup and restore
You can preserve Workspace and Scenario configuration for redeployment and download reports for later analysis. These options don't recover the resources that your Scenarios target.
Configuration: You can define your Workspace and Scenarios by using infrastructure as code, such as Bicep. Store these definitions in source control so that you can redeploy your configuration when needed. Redeploying configuration doesn't restore the execution state or history of previous Scenario runs. Include Scenario configurations and the managed identity's role assignments in your definitions. If you use a system-assigned identity, a redeployed Workspace gets a new identity, so you need to recreate its role assignments. For resource definitions, see the Workspace resource reference, Scenario resource reference, and Scenario configuration resource reference.
Reports: You can download Scenario reports and retain them in your own archive. A downloaded report records a run. It isn't a backup that you can restore to a new Workspace to recover the run history. For more information, see Download and share Scenario reports.
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.