summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-06 13:20:02 -0700
committerStan Hu <stanhu@gmail.com>2018-07-28 14:35:02 -0700
commiteb2bc7d99a99981150f32ac2469bff29eebbfa19 (patch)
tree89fa9dab380931b67718443ab17f61c486df12c9 /config/routes.rb
parent87f03f01735fb4b6dbef2e4bf625cf2546523a4e (diff)
downloadgitlab-ce-eb2bc7d99a99981150f32ac2469bff29eebbfa19.tar.gz
Simplify /-/liveness check to avoid connecting to the database
The previous implementation would hit the database each time and provide a dummy response. If the database goes down, this means all application workers would be taken out of service. Simplify this check by using a Rails middleware that intercepts this endpoint and returns a 200 response.
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e0a9139b1b4..6bf0335a923 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -46,7 +46,7 @@ Rails.application.routes.draw do
get 'health_check(/:checks)' => 'health_check#index', as: :health_check
scope path: '-' do
- get 'liveness' => 'health#liveness'
+ get 'liveness' => 'health#liveness' # Intercepted via Gitlab::Middleware::LivenessHealthCheck
get 'readiness' => 'health#readiness'
post 'storage_check' => 'health#storage_check'
resources :metrics, only: [:index]