Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sidekiq_health_check.md « administration « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 28bc670d8a7fa3beb3cfadb954b5b4a40fff44fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
stage: Enablement
group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---

# Sidekiq Health Check **(FREE SELF)**

GitLab provides liveness and readiness probes to indicate service health and
reachability to the Sidekiq cluster. These endpoints 
[can be provided to schedulers like Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
to hold traffic until the system is ready or restart the container as needed.

The health check server can be set up when [configuring Sidekiq](sidekiq.md).

## Readiness

The readiness probe checks whether the Sidekiq workers are ready to process jobs.

```plaintext
GET /readiness
```

Assuming you set up Sidekiq's address and port to be `localhost` and `8092` respectively,
here's an example request:

```shell
curl "http://localhost:8092/readiness"
```

On success, the endpoint returns a `200` HTTP status code, and a response like the following:

```json
{
   "status": "ok"
}
```

## Liveness

Checks whether the Sidekiq cluster is running.

```plaintext
GET /liveness
```

Assuming you set up Sidekiq's address and port to be `localhost` and `8092` respectively,
here's an example request:

```shell
curl "http://localhost:8092/liveness"
```

On success, the endpoint returns a `200` HTTP status code, and a response like the following:

```json
{
   "status": "ok"
}
```