HAProxy vs Kong: What are the differences?
HAProxy: 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; Kong: Open Source Microservice & API Management Layer. Kong is a scalable, open source API Layer (also known as an API Gateway, or API Middleware). Kong controls layer 4 and 7 traffic and is extended through Plugins, which provide extra functionality and services beyond the core platform.
HAProxy and Kong are primarily classified as "Load Balancer / Reverse Proxy" and "Microservices" tools respectively.
"Load balancer" is the top reason why over 118 developers like HAProxy, while over 28 developers mention "Easy to maintain" as the leading cause for choosing Kong.
Kong is an open source tool with 22.4K GitHub stars and 2.75K GitHub forks. Here's a link to Kong's open source repository on GitHub.
Instagram, Dropbox, and Medium are some of the popular companies that use HAProxy, whereas Kong is used by Checkr, Policygenius, and Decision6. HAProxy has a broader approval, being mentioned in 457 company stacks & 211 developers stacks; compared to Kong, which is listed in 50 company stacks and 14 developer stacks.
What is HAProxy?
What is Kong?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using Kong?
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
I use Kong because it reliably proxies traffic quickly with an assortment of pluggable features. The engineers behind the product are of the highest quality. The Company has cultivated the largest active open source community of any API gateway. They generally squash bugs in hours or days not weeks/months. Company engineers help community members through social avenues as well as supporting large enterprise. They heavily value their product and individuals as opposed to just solely growing enterprise license fees.
We needed a lightweight and completely customizable #microservices #gateway to be able to generate #JWT and introspect #OAuth2 tokens as well. The #gateway was going to front all #APIs for our single page web app as well as externalized #APIs for our partners.Contenders
We looked at Tyk Cloud and Kong. Kong's plugins are all Lua based and its core is NGINX and OpenResty. Although it's open source, it's not the greatest platform to be able to customize. On top of that enterprise features are paid and expensive. Tyk is Go and the nomenclature used within Tyk like "sessions" was bizarre, and again enterprise features were paid.Decision
We ultimately decided to roll our own using ExpressJS into Express Gateway because the use case for using ExpressJS as an #API #gateway was tried and true, in fact - all the enterprise features that the other two charge for #OAuth2 introspection etc were freely available within ExpressJS middleware.Outcome
We opened source Express Gateway with a core set of plugins and the community started writing their own and could quickly do so by rolling lots of ExpressJS middleware into Express Gateway
We're a small startup in San Francisco (team of 18 people). After spending lots of time building our core technology, it was time to bring it to life and deploy with several very large customers (500+ API requests/customer/minute).
We looked for a solid API management solution that would allow for easy authentication, quick installation and great logging features (requests and responses). After looking at various (very) expensive solutions out there, we ran into Kong.
After testing it for a few days, we deployed quickly to production to serve the needs of our customers. 3 weeks in, our experience has been great. Highly recommended to anyone who's looking for API management solutions.
P.s. Scored "Reliability" as "OK" for now with lack of data. Will definitely update once we've had Kong in production for a longer period of time.
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.
We use HAProxy to load balance web requests for our web application, but also for some internal load balancing of microservices.
And if developper can also code the load balancer ? Add plugin, dynamically change backend, Kong give this versatility