feat(keeper): add health-check sidecar for high availability (#110)#128
Open
FaithOnuh wants to merge 1 commit intoSoroLabs:mainfrom
Open
feat(keeper): add health-check sidecar for high availability (#110)#128FaithOnuh wants to merge 1 commit intoSoroLabs:mainfrom
FaithOnuh wants to merge 1 commit intoSoroLabs:mainfrom
Conversation
…s#110) - Add keeper/health-check-sidecar.sh: polls /health, restarts after FAILURE_THRESHOLD consecutive failures to prevent flapping - Update docker-compose.yml: add keeper-sidecar service using curlimages/curl with configurable env vars - Add keeper/README_SIDECAR.md: deployment guide covering Docker Compose, standalone, and systemd usage
|
@FaithOnuh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #110
Adds a lightweight health-check sidecar that monitors the keeper's
/healthendpoint and triggers a restart after a configurable number of consecutive failures, preventing both flapping and undetected outages.Changes
keeper/health-check-sidecar.sh— POSIX shell sidecar script. Polls/healthon a configurable interval, tracks consecutive failures, and executes aRESTART_CMDonly after the failure threshold is crossed. Includes timestampedINFO/WARN/CRITICALlog levels and a 5-second curl timeout to guard against network hangs.docker-compose.yml— Adds akeeper-sidecarservice using the minimalcurlimages/curlimage (~12 MB). Mounts the script read-only and exposesSIDECAR_POLL_INTERVAL_S/SIDECAR_FAILURE_THRESHOLDas top-level Compose variables.keeper/README_SIDECAR.md— Deployment guide covering Docker Compose, standalone process, and systemd unit configurations, plus a full environment variable reference and log format examples.Configuration
SIDECAR_POLL_INTERVAL_S15SIDECAR_FAILURE_THRESHOLD3RESTART_CMDkill -SIGTERM 1Testing
bash
Start the stack
docker compose up -d
Simulate a failure by stopping the keeper
docker compose stop keeper
Watch sidecar logs — after 3 failures it will trigger the restart command
docker compose logs -f keeper-sidecar