Repository navigation
feat: Healthcheck for Endpoints - #2
Merged
Merged
Conversation
fixes endpoint manager mutex call bug fix rendering and wierd garbled output add ports refine ports
- fix: change StopChecking behaviour, use atomic ops - add: circuitbreaker for healthchecks - fix: circuitbreaker - fix: missing formatting / update formatting - remove CLI colours for healthcheck and move to list - enhance circuit breaker logic for failures with network - add: heap based scheduler, with variable waits - change variable wait behaviour for blocking - add new metrics for failures and health checker - validate configuration - update healthcheck to remove validation which is now in endpointcoinfig - use an interface for HttpClient - missed chagnes to HttpClient - another miss for HttpClient - handle degredation of an endpoitn gracefully, how to promote an endpoint that returns?
- update references to styles - fixup messages - redo styles - redo more styles - fix up list styles - update main style for errors
- adds new statuses: busy, offline, warming - now network errors mean offline, 5xx or high latency > busy, 5xx and normal latency -> unhealthy, and 2xx + high latency -> busy - new backoff technique (needs testing), checks every 5s, first failure interval * 2 and it continues up till 12x. this gives time to recover - updated theme fix panic at the disco.../static issues with nodes that are failing aftere healthy update doucmentation add traffic weight for balancing fix doco for balancing circuit breaker changes for new balancing fix logging/output to TUI more TUI messages
- config hot reloading - changed config from main to app (chicken & egg problem now, but fixed) - fixese for memory leak when endpoints change
bahhh shutdown breaks because of orphan goroutine more leak fixes and some more, also change how endpoint updates are retrievd forgot to delete error counts adds a cleanup loop reorganise and cleanup the code abit tidy work and fix gramar
and batch endpoints to smaller buckets, lots of goroutines in profiler :(
const statuses in tracker health tracker changes to be lock-free fix health tracker not removing old entry alternate approach to getting active endpoints revert to the old endpoints atomic ops for circuit_breaker better way to get active endpoints, maybe not as complicated
broke other tests too fix cachemu
thushan
added a commit
that referenced
this pull request
May 27, 2025
…ut model bits for now, with basic handling at the root
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.
Health Check improvements
This PR introduces a heavy modification and implementation of the healthcheck system (precursor to implementing proxy pass-through).
Inspired by Sherpa and lessons learnt from implementing that, this tackles healthchecks a little differently and adds more clarity to the status of the health of endpoints (or ollama nodes).
NOTE:
Notes were originally generated by Github Copilot, then refined (it came out with some strange notes!)
Major Health Check Features Added
Circuit Breaker Pattern
Intelligent Backoff Strategy
Smart Status Classification
Advanced Health States
Technical Implementation
Worker Pool Architecture
Latency-Based Routing
Pre-computed Health URLs
url.Parse()calls during checksMonitoring & Observability
Status Transition Tracking
Health Check Statistics
{ "running": true, "worker_count": 10, "queue_size": 23, "queue_cap": 100, "queue_usage": 0.23 }Endpoint Health Summary
{ "total_endpoints": 4, "healthy_endpoints": 2, "routable_endpoints": 3, "unhealthy_endpoints": 1, "endpoints": [...] }Performance Improvements
Initial Health Check Optimisation
Cleanup & Resource Management
Atomic Circuit Breaker
Routing Intelligence
Priority-Based Failover
Traffic Weight Distribution