HAProxy is a battle-tested generic load balancer. Ollama Herd is a purpose-built LLM fleet router. HAProxy spreads requests blindly across identical backends; Herd scores nodes on what's actually happening inside each Ollama.
HAProxy is the right tool for identical dedicated servers. Ollama Herd is the right tool for a fleet of real, mixed machines. HAProxy is one of the best load balancers ever built, but it treats each Ollama as an opaque HTTP endpoint. It has no idea which machine already has your model loaded, how much memory each has, or whether a laptop is thermal-throttling. For local LLMs, where a cold model load costs 15 to 30 seconds, that blindness is a real latency cost. Herd is built to see inside the fleet.
HAProxy is a mature, open-source, high-performance TCP and HTTP load balancer used across the internet. It's not Ollama-specific; you point it at any set of backends. To load balance Ollama, you write an haproxy.cfg listing each machine's Ollama endpoint, pick a balancing algorithm (round-robin, least-connections, source-hash), and add a health check. It's rock-solid, extremely fast, and does far more than routing: TLS termination, rate limiting, sticky sessions, ACLs, observability.
Ollama Herd is an open-source smart multimodal AI router that turns multiple inference nodes across Apple Silicon and mixed hardware into one intelligent endpoint. It routes LLMs, embeddings, image generation, speech-to-text, and vision with a 8-signal scoring engine, mDNS auto-discovery, an 8-tab real-time dashboard, and OpenAI + Ollama + Anthropic Messages API compatibility. Two commands to set up, zero config files. pip install ollama-herd or brew install ollama-herd.
HAProxy load balances. Herd routes. The distinction matters for local LLMs:
haproxy.cfg edit and reload. Herd discovers nodes over mDNS; a new node just appears.| Feature | HAProxy | Ollama Herd |
|---|---|---|
| Core approach | Generic TCP/HTTP load balancer | Purpose-built LLM fleet router |
| Node discovery | Config file (haproxy.cfg) | mDNS auto-discovery, zero config |
| Routing logic | Round-robin, least-conn, source-hash | 8-signal device-aware scoring |
| Model-residency aware | No (opaque backends) | Yes (hot model gets a large bonus) |
| Memory-fit aware | No | Yes (big models to capable machines) |
| Workstation awareness | No | Thermal, meeting, foreground-app |
| Multimodal routing | No (opaque HTTP) | LLM, embeddings, image gen, STT, vision |
| API surface | Whatever the backend speaks | OpenAI + Ollama + Anthropic Messages, first-class |
| TLS termination, rate limiting | Yes, excellent | Not its focus (put HAProxy in front) |
| Dashboard | Stats page | 8-tab live fleet dashboard |
| Setup | Write and maintain a config file | pip install ollama-herd, two commands |
| License | GPL / commercial | MIT |
haproxy.cfg to write or maintain. Start herd-node on a machine and it joins the fleet in about 60 seconds.This isn't strictly either/or. HAProxy is a great front door and Herd is a great brain. A common pattern: HAProxy handles TLS termination and rate limiting at the edge, then forwards to the Herd router, which does the model-aware routing across your fleet. You get HAProxy's hardened edge and Herd's LLM intelligence.
| Scenario | Choose |
|---|---|
| Identical dedicated inference servers, same models on each | HAProxy |
| You already run HAProxy and want TLS + rate limiting | HAProxy (optionally in front of Herd) |
| Mixed machines (different sizes, laptops used for work) | Ollama Herd |
| You want to avoid cold-load stalls | Ollama Herd |
| Zero config and automatic discovery of new machines | Ollama Herd |
| You route more than chat (embeddings, image gen, STT) | Ollama Herd |
| Hardened edge plus model-aware routing | Both, layered |
HAProxy is one of the best generic load balancers in existence, and for a rack of identical servers it's a fine way to spread Ollama traffic. But a load balancer that can't see which machine has your model loaded is leaving the biggest local-LLM optimization on the table. Herd is built for exactly that: it routes on what's happening inside each Ollama, discovers your fleet automatically, and speaks the APIs your tools already use.
pip install ollama-herd # or: brew install ollama-herd
herd # start the router
herd-node # on each device
See the load-balancing guide for the full picture, including a working HAProxy config.
Yes, with round-robin across your Ollama backends and a health check. It works for identical servers, but it can't tell which machine has your model loaded or how busy each one is.
Model-residency-aware routing, mDNS auto-discovery, memory-fit and workstation awareness, multimodal routing, and native OpenAI/Anthropic APIs.
Yes, MIT licensed. HAProxy is also open source (with a commercial edition available).