Skip to content

Return 503 until pages are loaded for the first time

Kamil Trzciński requested to merge 503-until-pages-are-loaded into master

This MR extends -pages-status to return 503 if pages are not yet loaded for the first time.

This MR also makes to return 503 for every page until pages are not loaded for the first time.

This makes -pages-status to be a proper health check that can be used by load balancer to verify if given daemon of pages should be used for serving resources.

Solves part of https://gitlab.com/gitlab-com/infrastructure/issues/3078#note_48385498.

It does not solve pages being locked for whatever reason, but allows us to have uninterrupted pages operation.

How should it be used?

  1. Define -pages-status /@healthz (or anything else)
  2. Make load balancer to use given daemon only if endpoint returns 200.

cc @pcarranza @northrup

Merge request reports