Live data from Hacker News

HAProxy 2.0

haproxy.com

71–80 of 120 posts

Re: HAProxy 2.0

#71

Such a great project! I was a squid guy, then nginx and now since nginx stopped getting new features due to the commercial edition I am switching. Thank you developers for this amazing work!

To be fair to squid and nginx, they don't do the same things. Squid is mainly a forward proxy. Nginx is mainly a web server. There's no reason for not using them anymore for these use cases where they excel.

Re: HAProxy 2.0

#72
post #27

Is the v1 config backwards compatible with this? I can't see it mentioned anywhere so assume you can just upgrade in place?

Apart from a few new warnings for long-deprecated options it is compatible. HAProxy 2.0 is not a major version. Willy apparently just dislikes two-digit versions in the second place.

Exactly, I want directory listings to remain alphanumerically ordered, not like when you want to download Git and end up believing 2.9 is the latest one :-)

Re: HAProxy 2.0

#73
post #68

Are there any programmble http proxy servers? I write a fair bit of VM/container control software and often need to map URLs to specific entities on the network dynamically. Never found a good programmable proxy with routing table API and always had to hand roll.

By programmable you mean configurable via a REST api?

Yes, pretty much. E.g. DigitalOcean's online SSH terminal. Programmable routing of websockets code to backend VM.

Re: HAProxy 2.0

#74

The conversation in this thread has made me wonder after reading it if anyone uses Apache2 as their webserver anymore. Edit: seems many still do! I thought it was dying slowly as php popularity was going down.

What conversation? Been using apache2 for like 20+ years now. It is doable to switch to something else, but would probably require effort with various details, etc. It works well for our moderate loads, so not really urgent to change it.

Hehe I still have the unbreakable 1.3 running on some home machines. It doesn't want to die so I'm not forcing it :-)

Re: HAProxy 2.0

#75

Are there any programmble http proxy servers? I write a fair bit of VM/container control software and often need to map URLs to specific entities on the network dynamically. Never found a good programmable proxy with routing table API and always had to hand roll.

Traefik is a very good programmable proxy.

Re: HAProxy 2.0

#76

I've always used Nginx as a proxy, but I've seen HAProxy mentioned, what are some of the benefits of using HAProxy over nginx as a proxy or load balancer?

The Problem with HAProxy is largely configuration. I've written ansible templates that generate the complicated and repetitive parts of that config for me.

Other than not logging to stdout (which 2.0 seems to fix), that's the only thing that bugs me about HAproxy.

HAProxy is probably the best proxy server I had to deal with ever. It's performance is exceptional, it does not interfere with L7 data unless you tell it to and it's extremely straightforward to configure reading the manual.

I use HAProxy as a frontend proxy to distribute requests into my intranet, it handles about 3-50 requests per second on a very dinky little VM (1 CPU core, 512/1024 CPU time allocation, 512MB ram) with a lot of CPU still left over.

Re: HAProxy 2.0

#77

Does it have proper support for HTTP/2.0? Last I checked, only Nginx really did it right.

As of last April, several implementations (including HAProxy) were more "right" than Nginx: https://twitter.com/tunetheweb/status/988196156697169920

I never saw this classification. Since 1.9 haproxy passes 100% of the h2spec tests.

Re: HAProxy 2.0

#78

Earlier quoted context omitted.

As of last April, several implementations (including HAProxy) were more "right" than Nginx: https://twitter.com/tunetheweb/status/988196156697169920

I never saw this classification. Since 1.9 haproxy passes 100% of the h2spec tests.

Nice work!

Re: HAProxy 2.0

#79

Sounds like HAProxy 2.0 is Envoy. I would personally (and do) just use Envoy, as everyone else is already using it and the bugs they've found have been fixed.

This is a strange assertion. This is not envoy, it's haproxy as you've always known it plus all the features people have been asking for recently, without removing what makes it fast, robust, compact and flexible. From what I've seen you can't for example use dynamic weights in envoy, protect from DDoS, perform queuing to protect your servers, use true leastconn or weighted hash/roundrobin, stick on arbitrary information nor synchronize it between members of the cluster, create complex routing rules, set the source address from headers, perform transparent proxing, etc.

These are two different projects. One was initially designed for the hostile edge and excels here. The other one was initially designed to be used as a side car deep into your infrastructure and excels there. There is obviously quite some overlap between the two, sometimes with different terminology (like "circuit breaking" in envoy that haproxy calls "timeouts" and "queue limits"), and users demands make each of them evolve a bit in the area they are less good (i.e. where the other one excels). But they are still quite different beasts.

Re: HAProxy 2.0

#80

Earlier quoted context omitted.

What open-source NGINX lacks that open-source HAProxy has: * ACL rules with full support for logical if statements [1] * active health checks * end-to-end HTTP/2 [2] * Robust logging or a dashboard with metrics * The ability to read env variables * session stickiness * DNS service discovery [3] These are just things I'm aware of, there could be a lot more. HAProxy has shown itself to perform better for certain users…

WRT > end-to-end HTTP/2 [2] I think this is supported. We are using NGINX with its core Stream module to receive HTTP/2 encrypted traffic, and loadbalance it (with random or least_conn) algorithms -- to each of our backends. Traffic stays encrypted end-to-end, and it remains HTTP/2 (because the Stream module works at TCP level, not http so it does not care http/2 or http/1 is used). It seems that in the ticket [2] th…

Thus it's just a plain TCP proxy and cannot route the traffic intelligently (based on Host or path) nor cache it. Following the same principle it could be said that haproxy has been supporting end-to-end H2 since version 1.0 long before H2 even existed!

With haproxy you can combine any set of H1/H2 on any side (protocol translation). It can even dynamically choose H1 or H2 depending on the negotiated ALPN the server presents, just like a browser does!

Post reply on HN