Skip to content

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions