gitlab-org--gitlab-foss/doc/administration/sidekiq_health_check.md

1.4 KiB

stage group info
Enablement Distribution 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 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.

Readiness

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

GET /readiness

If you set Sidekiq's address as localhost and port as 8092, here's an example request:

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

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

{
   "status": "ok"
}

Liveness

Checks whether the Sidekiq cluster is running.

GET /liveness

If you set Sidekiq's address as localhost and port as 8092, here's an example request:

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

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

{
   "status": "ok"
}