Skip to content

[automatic failover] HealthCheckImpl improvements - use shared executors across all health checks #4254

@ggivo

Description

@ggivo

Currently, each HealthCheck instance uses its own ScheduledExecutorService for scheduling (via scheduleAtFixedRate) and a separate executor (Executors.newCachedThreadPool()) for running the actual health check tasks.

That works but we might save some resources by sharing the scheduler among all HealthChecks

Enhancement idea:
Consider introducing a shared scheduler and/or executor service across all HealthCheck instances:

  • Single shared ScheduledExecutorService: schedule health checks for all endpoints, reducing thread footprint.
  • Shared worker executor pool: power the health check logic from a common pool, avoiding too many cached pools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions