Skip to main content

Execute serial and parallel faults

This section describes how to add and execute serial and parallel faults within a single chaos experiment, analyze chaos experiments, and launch an experiment from ChaosHub.

You can add multiple faults in a single chaos experiment to validate the resiliency of the entire application stack.

  • HCE scales efficiently in a cloud-native manner to execute these experiments, which can have multiple faults running in serial and/or parallel at any given time.

  • While creating these chaos experiments, you must consider the overall impact on the application. Your experience in production environments may differ due to lack of resources when a number of parallel faults are being executed.

Add serial and parallel faults

  1. To add a fault that runs in parallel to another fault, point your mouse below an existing fault, and then select Add. You can follow the same process to add a serial fault.

    Complex Faults Experiment

note

For Linux, experiments with a parallel fault are currently not supported.

The image below shows a single experiment that consists of serial and parallel faults.

  • Faults A, B, and C are parallel faults. They begin execution at the same time.

  • Faults A, B, C and faults D and E are serial. A, B, and C complete execution and then D and E begin execution.

  • Similarly, faults H and I are serial faults, where H completes execution, and I begins.

    Complex Faults Experiment

Analyze chaos experiments

You can observe the status of execution of fault/s of a chaos experiment during its run. The screen shows the experiment pipeline on the right hand side, and details such as Environment, Infrastructure Name, and the runs that have passed and failed on the left hand side.

Experiment Executing

When the experiment completes execution, it displays the Resilience Score. This score describes how resilient your application is to unplanned failures. The probe success percentage helps determine the outcome of every fault in the chaos experiment. Probes (if any) associated with the experiment are used to understand how the application fared.

Experiment Failed

If any of the faults fail, you can find the Fail Step that elaborates on the reason why the fault failed.

Result Fail Step

Launch an experiment from a chaos hub

You can launch experiments from the default Enterprise Chaos Hub or from custom hubs.

note

Launching the experiment from a hub is different from running an experiment from the Chaos Experiments page. The experiments in chaos hubs are actually templates, so when you launch them from a hub you must provide some additional details. The experiments in the Chaos Experiments page execute immediately, as configured, when you run them.

To launch an experiment from a chaos hub:

  1. In Harness, navigate to Chaos > ChaosHubs.

    navigate

  2. Select the hub whose experiments you wish to launch.

    Select hub

  3. Find the experiment you want to launch, and then select Launch Experiment.

    Launch

  4. Select a chaos infrastructure, and then select Next. You can change the infrastructure type if necessary.

    Select a Chaos Infrastructure

  5. This takes you to the Experiment Builder where you can select the faults in the experiment to configure them. You can add more faults or delete faults from the experiment, or update the sequence of faults.

  6. Select Run to execute the experiment.

tip

You can also save your customized experiment as a template in a chaos hub using the Save button.