Testing Backends For Availability
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 a
Tickerthat fires every 1 second. The
checkConnectionfunction is called to send an Http GET to the backend and look for a response from the backend.
disruptionSampleswhich represent the startTime of the Http GET and an associated
sampleErrthat trackes if the Http GET was successful (sampleErr set to
nil) or failing (the error is saved). The
disruptionSamplesare stored in a slice referenced by 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.