Skip to content

Conversation

@smahima27
Copy link
Contributor

  • Implement circuit breaker pattern to prevent cascading failures

    • Opens after 5 consecutive failures (configurable)
    • Half-open testing after 30s timeout
    • Fail-fast to prevent thread exhaustion
  • Add adaptive timeout mechanism

    • Adjusts based on p95 latency + 50% buffer
    • Reduces timeout on failures for faster fail
    • Bounded by configurable min/max values
  • Add connection pool health monitoring

    • Track utilization, waiting threads, available connections
    • Emit metrics for critical/warning states
    • Monitor circuit breaker and timeout stats
  • Integrate into base provider class

    • Auto-initialize if enabled in config
    • Provider-specific settings override global defaults
    • Backward compatible (enabled by default)
  • Add configuration options to vmpooler.yaml.example

    • circuit_breaker_* settings
    • connection_pool_timeout_* settings
    • connection_pool_monitor_* settings

Addresses cascading failure scenario where provider outages cause
thread exhaustion and system-wide outage despite other providers
being healthy. Enables graceful degradation and auto-recovery.

@smahima27 smahima27 requested a review from a team as a code owner December 26, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants