Testing Backends For Availability
This is an overview for how backends are queried for their availability status.
Overview Diagram
This diagram shows how backends are queried to determine their availability:

- (1) Starting from a call to StartAllAPIMonitoring, one of several BackendSamplers are created:
| |
- (2) Then a disruptionSampler is created with that BackendSampler https://github.com/openshift/origin/blob/08eb7795276c45f2be16e980a9687e34f6d2c8ec/pkg/monitor/backenddisruption/disruption_backend_sampler.go#L410
- (3) The
produceSamplesfunction is called to produce the disruptionSamples. This function is built around aTickerthat fires every 1 second. ThecheckConnectionfunction is called to send an Http GET to the backend and look for a response from the backend.
| |
(4) The
checkConnectionfunction, producesdisruptionSampleswhich represent the startTime of the Http GET and an associatedsampleErrthat trackes if the Http GET was successful (sampleErr set tonil) or failing (the error is saved). ThedisruptionSamplesare stored in a slice referenced by thedisruptionSampler.(5) The
consumeSamplesfunction takes the disruptionSamples and determines when disruption started and stopped. It then records Events and records Intervals/Conditions on the monitorRecorder.
| |
- (6) Intervals on the monitorRecorder are used by the synthetic tests.
Last modified June 22, 2022: Starter Disruption Documentation (#263) (292d250)