This page explains how to set up a new experiment template for Degrade Application Traffic fault.
This fault lets you selectively degrade L7 traffic through a specified application load balancer.
Before proceeding, you must have the following:
- Permission to view Load Balancer Forwarding rules and Backend Services in
the project –
compute.viewer, compute.networkViewerorviewerrole. - The
roles/faulttesting.operatorrole.
To create a new experiment template, do the following:
- Open the Google Cloud console.
- Navigate to the Fault Injection Testing Overview page.
- Select Create experiment template.
- Alternatively, from the Fault Injection Testing Overview page, click Experiment templates on the left navigation bar, and click Create Template.
- In the Fault Type section, select the Degrade application traffic option.
- In the Target section, use the filters and select either XLB (External
Load Balancer) or ILB (Internal Load Balancer).
- (Mandatory) Select the Load balancer frontend service that is part of the forwarding rule you want to target.
- In the Fault Parameters section, set the following:
- Type of load balancer fault - choose from the following:
- HTTP delay injection - insert a delay into the selected forwarding rule.
- Delay percentage - percentage of traffic to impact with a delay. The remaining traffic will pass as normal.
- Latency duration - how much latency to add to this delayed traffic.
- HTTP error injection - send HTTP error responses for the selected
forwarding rule. Specify the following parameters:
- Error code - the error response code you expect to see from your load balancer, ideally a 5xx response code.
- Error percentage - percentage of traffic that will send the specified error response code. The remaining traffic will receive normal response codes.
- Experiment duration - determines how long the fault condition should last.
- Type of load balancer fault - choose from the following:
- In the Template name section, provide a clear and descriptive name for the template. Optionally provide details in the description.
- In the Verify section:
- See a recap of the settings you selected.
- Wait for the automated dry run to finish.
- After the dry run is complete, the list of resources that will receive the fault injection appears. If there are errors with the targeted resources, they will also appear here.
- Create the experiment template. A confirmation message indicating that the template has been created appears, and the new template shows up in the list of templates.
What's next
Run an experiment using the experiment template you created.