Proxy Lifecycle
Duration
The default behavior of the fault's proxy is to run indefinitely. You may
change that by setting the --duration
flag with a value in seconds. Once this
duration has been reached, the proxy will automatically terminates.
The flag supports a variety of units to express the duration more conveniently.
Setting the duration has a nice side-effect that the scheduling of fault injections can be declared relatively to this duration. For instance:
- fault will run for
5 minutes
- A first wave of latency will start after
15s
and run for90s
- A second wave of latency will start after
270s
and run for15s
When a duration is set, fault displays a progress bar:
Scheduling
fault applies faults for the entire duration of the run by default. You may change this by setting a schedule for each enabled fault.
A schedule defines a sequence of start, duration for the fault. These values describe ranges when a particular fault should be enabled. The rest of the time, the fault is disabled.
The start and duration should be either fixed, and set in seconds,
of relative and set as a percentage of the total runtime. In that latter case,
you must pass the total duration via --duration
.
Mixing relative and fixed schedules is supported.
Note
Relative scheduling is declared using percentages of the total duration. It is not a ratio of seen requests.