This episode tells the HAProxy story: born as a side project of Willy Tarreau, it grew into the standard open-source load balancer. You also learn how it compares with NGINX, Envoy, and F5, and the best use cases for HAProxy at layers 4 and 7.

Before you write your first haproxy.cfg, it's worth understanding where HAProxy came from and why it's so popular. Episode 1 answers two questions: why HAProxy was born, and when you should choose it over the alternatives.
You'll see HAProxy's journey from a simple tool into the backbone of giant websites, then compare it honestly with NGINX, Envoy, and F5. By the end of the episode, you'll have a framework for deciding which tool fits each scenario.
HAProxy was written by Willy Tarreau and development started around the year 2000, with the first stable release in 2001. Initially it was a personal tool for solving load balancing in front of the web servers of the open-source projects he managed. Because it proved stable and fast, the project was opened up as free software and has kept evolving ever since.
The name HAProxy itself is short for HA (High Availability) and Proxy. Its focus from day one: sustain high traffic with small resources, without blocking, and with good server failure prediction.
From an architecture standpoint, HAProxy is an event-driven application running in user space: a single process handles tens of thousands of connections simultaneously without copying data unnecessarily. This is what allows it to serve heavy traffic on popular sites such as GitHub, Twitter, Reddit, and various cloud providers.
apt show haproxy 2>/dev/null | head -n 8The output of apt show haproxy shows the package description, version, and its dependencies. HAProxy is also actively developed by the community and updated regularly, often following a two-year release cycle with long-term support.
Unlike the thread-per-connection model, HAProxy uses an event loop that never blocks. Connections are handled asynchronously, so CPU and memory usage stay low even with a large number of connections. We'll dissect the architecture details in episode 2; for now what matters is knowing this: speed and efficiency are in HAProxy's DNA.
NGINX is a versatile web server and reverse proxy. The main differences:
For pure traffic routing, HAProxy is often lighter; for serving content and caching, NGINX is more versatile. Many architectures use both at once.
Envoy is a data plane proxy born from the service mesh ecosystem, rich in observability features and a xDS API for dynamic configuration. The comparison:
Envoy makes sense if you're already building a service mesh like Istio; HAProxy wins when you need a standalone solution that's easy to operate.
F5 (for example BIG-IP) is a commercial appliance with a GUI, WAF, and enterprise-grade vendor support. The comparison:
Both can coexist: HAProxy as the data plane, F5 as an edge appliance with additional security.
Important note: the comparisons above aren't permanent verdicts. NGINX keeps adding load balancing features, and HAProxy keeps gaining HTTP features with every release. Far more useful than picking one is understanding the category you're dealing with: a web server, a data plane proxy, or an enterprise appliance.
In TCP mode, HAProxy proxies any raw connection: databases, Redis, memcached, and legacy protocols. There's no interpretation of packet contents, just extremely fast forwarding.
In HTTP mode, HAProxy can route based on path, host, and headers, perform rewrites, use ACLs, and throttle requests. This makes it a lightweight API gateway for microservices, which we'll cover in episode 11.
HAProxy can terminate TLS connections at the edge, then forward internal traffic as plain HTTP. Backends don't need to bother managing certificates. Details are in episode 8.
With SNI inspection, HAProxy can route TLS passthrough connections to different backends based purely on the domain name, without opening the traffic contents. Details are in episode 12.
Here's a general pattern you can use as a rule of thumb:
There's no single right answer; what matters is matching your needs to each tool's strengths.
A pragmatic approach production teams often use: start with the simplest thing, HAProxy for pure routing needs, then add NGINX or a service mesh only when a specific need arises that truly can't be met otherwise. Adding layers of technology without a clear reason just adds operational overhead.
Episode 1 places HAProxy on the big map of the proxy ecosystem: a long history that proves its stability, an event-driven design that's resource-efficient, and a clear position relative to NGINX, Envoy, and F5.
Key takeaways:
In the next episode we'll dissect HAProxy's core concepts and main architecture — the global, defaults, frontend, backend, and listen configuration sections, the request flow inside the process, and TCP versus HTTP operating modes. This is the foundation used by every episode that follows.