Skip to content

feat: HAProxy load balancing for multi-endpoint services - #23

Merged
SamD merged 2 commits into
mainfrom
feature/haproxy-load-balancing
Jun 3, 2026
Merged

feat: HAProxy load balancing for multi-endpoint services#23
SamD merged 2 commits into
mainfrom
feature/haproxy-load-balancing

Conversation

@SamD

@SamD SamD commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Adds HAProxy-based load balancing for multi-endpoint LLM, embedding, whisper, and OCR services. When *_ENDPOINTS env vars are set with comma-separated backend URLs, HAProxy containers start automatically and distribute requests across all backends. roundrobin balancing, health checks, stats UI. 33 tests passing, ruff clean.

Sam added 2 commits June 3, 2026 16:15
…/OCR

- Add HAProxy containers (supervisor, embedding, whisper, OCR) to docker-compose
- Auto-detect *_ENDPOINTS env vars and override *_PATH to HAProxy URLs
- roundrobin balancing with httpclose for even distribution
- Health checks on /models and /health endpoints
- Stats UI on ports 8404-8407
- Content handler MIME type support (BaseContentTypeHandler.get_mime_type)
- Fix whisper transcription for non-WAV files (was hardcoding audio/wav)
- Fix Docker build: use lock file for pinned dependency resolution
- Fix warmup: skip Docling when OCR_PATH is remote
- Add shared/utils.py with parse_endpoints and resolve helpers
- Update docs: overview, quickstart, operations with HAProxy sections
- 33 tests passing, ruff clean
…, and README

- Updated quickstart.md distributed deployment diagram with HAProxy containers
- Updated overview.md sequence diagram to show HAProxy in supervisor and embedding paths
- Added multi-endpoint section to README quick start
@SamD
SamD merged commit 9af86f4 into main Jun 3, 2026
@SamD
SamD deleted the feature/haproxy-load-balancing branch June 3, 2026 23:29
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.

1 participant