> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-testing/actions/delay-action.md).

# Delay Action

### What is a Delay Action? <a href="#what-is-a-delay-action" id="what-is-a-delay-action"></a>

A **Delay Action** introduces a configurable time delay during chaos experiment execution. It pauses the experiment workflow for a specified duration, allowing you to:

* Create time gaps between different experiment phases
* Allow systems to stabilize after fault injection
* Wait for monitoring systems to capture metrics
* Simulate real-world scenarios where operations require time
* Control the timing and pacing of experiment execution

### When to Use Delay Actions <a href="#when-to-use-delay-actions" id="when-to-use-delay-actions"></a>

Delay actions are particularly useful in the following scenarios:

#### System Stabilization <a href="#system-stabilization" id="system-stabilization"></a>

* **After Fault Injection**: Allow time for systems to react to injected faults
* **Before Validation**: Wait for systems to reach a steady state before running probes
* **During Recovery**: Give systems time to recover from chaos events

#### Monitoring and Observability <a href="#monitoring-and-observability" id="monitoring-and-observability"></a>

* **Metric Collection**: Allow monitoring systems to collect sufficient data points
* **Alert Processing**: Wait for alerting systems to detect and process anomalies
* **Dashboard Updates**: Give dashboards time to reflect system state changes

#### Realistic Scenarios <a href="#realistic-scenarios" id="realistic-scenarios"></a>

* **Gradual Rollouts**: Simulate gradual deployment or rollback scenarios
* **User Behavior**: Model real-world user interaction patterns
* **System Dependencies**: Account for dependencies that have inherent delays

### How to configure a Delay Action <a href="#how-to-configure-a-delay-action" id="how-to-configure-a-delay-action"></a>

#### Step 1: Create a New Action <a href="#step-1-create-a-new-action" id="step-1-create-a-new-action"></a>

1. Navigate to your **Probes & Actions** and go to the **Actions** tab
2. Click **New Action** and select **Delay** from the dropdown.

   ![delay action](/files/QOmiyBKOL3txDGR4YoLC)

#### Step 2: Configure Delay Parameters <a href="#step-2-configure-delay-parameters" id="step-2-configure-delay-parameters"></a>

Configure the following parameters for your delay action:

* **Action Name**: Provide a descriptive name for the delay action (e.g., "Wait for system stabilization")
* **Infrastructure Type**: Select the target infrastructure (e.g., Kubernetes)

  ![configure delay action](/files/QOmiyBKOL3txDGR4YoLC)
* **Duration**: Specify the delay duration

  ![delay action duration](/files/vVt3eAJCxh50W1Q3VM2F)

#### Step 3: Position the Action <a href="#step-3-position-the-action" id="step-3-position-the-action"></a>

Place the delay action at the appropriate point in your experiment workflow:

* **Before Faults**: To prepare systems before chaos injection
* **Between Faults**: To create gaps between different fault injections
* **After Faults**: To allow systems to stabilize before validation

### Monitoring Delay Actions <a href="#monitoring-delay-actions" id="monitoring-delay-actions"></a>

#### Timeline View <a href="#timeline-view" id="timeline-view"></a>

* View delay execution in the experiment timeline
* Track delay start and completion times
* Monitor overall experiment duration impact

#### Execution Logs <a href="#execution-logs" id="execution-logs"></a>

* Review delay action logs for execution details
* Check for any issues during delay execution
* Validate that delays are executed as configured

### Common Patterns <a href="#common-patterns" id="common-patterns"></a>

#### Progressive Delays <a href="#progressive-delays" id="progressive-delays"></a>

Use increasing delay durations for progressive fault injection:

```
Fault 1 → 30s delay → Fault 2 → 60s delay → Fault 3 → 90s delay
```

#### Recovery Windows <a href="#recovery-windows" id="recovery-windows"></a>

Create recovery windows between fault phases:

```
Chaos Phase → 2min delay → Validation Phase → 1min delay → Cleanup Phase
```

#### Monitoring Intervals <a href="#monitoring-intervals" id="monitoring-intervals"></a>

Align delays with monitoring collection intervals:

```
Fault Injection → 30s delay (metric scrape interval) → Probe Validation
```

### Next Steps <a href="#next-steps" id="next-steps"></a>

* [Learn about Custom Script Actions](/resilience-testing/chaos-testing/actions/custom-script-action.md)
* Explore experiment timeline view (see Experiments documentation)
* [Create experiments with actions](/resilience-testing/chaos-testing/experiments.md)
