OWASP / OWASP/Nest

Implement django-health-check to Detect Broken DB/Redis Connections

Open
#3,887 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
451
Forks
702
Avg merge
22h 59m
Merged PRs (30d)
91

Description

**Is your feature request related to a problem? Please describe.**

The current docker health checks ([redis-cli](https://github.com/OWASP/Nest/blob/main/docker-compose/local/compose.yaml#L48), [pg-check](https://github.com/OWASP/Nest/blob/main/docker-compose/local/compose.yaml#L65)) only verify that the infrastructure containers are running. They do not verify if the backend application itself can successfully connect to these services.
Docker thinks the container is healthy, but the application is actually broken like due to misconfigured credentials for db.

**Describe the solution you'd like**

I would like to replace the basic shell-command health checks with a proper application level health check using django-health-check.

- By installing it.
- By exposing an endpoint that actually checks connectivity probes with db.
- Also update docker

This ensures traffic is only routed to the container if the application is fully functional.

**Are you going to work on implementing this?**

- [x] Yes
- [ ] No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.