HAProxy vs Traefik: What are the differences?
Developers describe HAProxy as "The Reliable, High Performance TCP/HTTP Load Balancer". HAProxy (High Availability Proxy) is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. On the other hand, Traefik is detailed as "Load Balancer for Microservices". Træfɪk is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. It supports several backends (Docker, Swarm, Mesos/Marathon, Kubernetes, Consul, Etcd, Zookeeper, BoltDB, Rest API, file...) to manage its configuration automatically and dynamically.
HAProxy and Traefik can be categorized as "Load Balancer / Reverse Proxy" tools.
"Load balancer" is the primary reason why developers consider HAProxy over the competitors, whereas "Kubernetes integration" was stated as the key factor in picking Traefik.
Traefik is an open source tool with 23K GitHub stars and 2.36K GitHub forks. Here's a link to Traefik's open source repository on GitHub.
According to the StackShare community, HAProxy has a broader approval, being mentioned in 452 company stacks & 205 developers stacks; compared to Traefik, which is listed in 46 company stacks and 17 developer stacks.
What is HAProxy?
What is Traefik?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
We use HAProxy to load balance between our webservers. It balances TCP between the machines round robin and leaves everything else to Node.js, leaving the connections open with a reasonably long time to live to support WebSockets and re-use of a TCP connection for AJAX polling.
HAProxy manages internal and origin load balancing using KeepaliveD. Two small servers host the entire site, never moving about 15% load even during the largest load spikes.
We use HAProxy to balance traffic at various points in our stack, includgin nginx nodes on different physical machines, and api nodes on the backend.
I use HAproxy primarily for application routing and SSL termination. I also use its logs and statistics to visualize incoming traffic in Kibana.