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.
显示
- app/controllers/health_controller.rb 2 个添加, 3 个删除app/controllers/health_controller.rb
- changelogs/unreleased/sh-simplify-liveness-check.yml 5 个添加, 0 个删除changelogs/unreleased/sh-simplify-liveness-check.yml
- config/application.rb 4 个添加, 0 个删除config/application.rb
- config/routes.rb 1 个添加, 1 个删除config/routes.rb
- doc/user/admin_area/monitoring/health_check.md 5 个添加, 22 个删除doc/user/admin_area/monitoring/health_check.md
- lib/gitlab/middleware/liveness_health_check.rb 43 个添加, 0 个删除lib/gitlab/middleware/liveness_health_check.rb
- spec/controllers/health_controller_spec.rb 0 个添加, 51 个删除spec/controllers/health_controller_spec.rb
- spec/lib/gitlab/middleware/liveness_health_check_spec.rb 57 个添加, 0 个删除spec/lib/gitlab/middleware/liveness_health_check_spec.rb
想要评论请 注册 或 登录