This section describes adding and executing serial and parallel faults within a single chaos experiment, analyzing chaos experiments and launching an experiment from chaos hub.
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
- 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.
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, that is, they begin execution at the same time.
- Faults A, B, C and faults D and E are serial, that is, the former completes execution, and the latter begins execution.
- Similarly, faults H and I are serial faults, where H completes execution, and I begins.
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.
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.
If any of the faults fail, you can find the Fail Step that elaborates on the reason why the fault failed.
Launch an experiment from a chaos hub
You can launch experiments from the default Enterprise Chaos Hub or from custom hubs.
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:
In Harness, navigate to Chaos > ChaosHubs.
Select the hub whose experiments you wish to launch.
Find the experiment you want to launch, and then select Launch Experiment.
Select a chaos infrastructure, and then select Next. You can change the infrastructure type if necessary.
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.
Select Run to execute the experiment.
You can also save your customized experiment as a template in a chaos hub using the Save button.