Skip to content

Health check should support configurable consecutive failure/success thresholds before marking a node as error or recovered #620

Closed

Description

@mustfqyl

Add configurable node health check thresholds to reduce false positives.

Currently, a single failed health check can mark a node as error or trigger a reconnect. In real-world environments, temporary network issues, API delays, or short Xray restarts may cause false downtime reports.

Suggested settings:

  • NODE_HEALTH_FAIL_THRESHOLD=3
  • NODE_HEALTH_RECOVER_THRESHOLD=2

Example behavior:

  • Mark node as error only after 3 consecutive failed checks.
  • Mark node as healthy only after 2 consecutive successful checks.

This would significantly improve uptime accuracy and prevent unnecessary reconnects.

Activity

  1. added
    enhancement
    on Jun 16, 2026
  2. dr-hoseyn commented on Sep 27, 2026

    @dr-hoseyn
    Contributor

    done

  3. T3ST3ST3R0N commented on Oct 11, 2026

    @T3ST3ST3R0N
    Collaborator

    Added in #950: NODE_HEALTH_FAIL_THRESHOLD (default 3) and NODE_HEALTH_RECOVER_THRESHOLD (default 2) set how many failed checks mark a node as down and how many good ones bring it back (see .env.example). It ships in the next release. Thanks for the request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions