Live data from Hacker News

Haproxy 2.2

haproxy.com

51–60 of 61 posts

Re: Haproxy 2.2

#51
Haproxy is brilliant, we've used it for years as a simple mesh on all our services, but we're considering moving to envoy as we need opentracing support to help understand how requests flow between services.

Anyone managed to make this work on haproxy?

Re: Haproxy 2.2

#52
post #4

Haproxy is such a nice piece of software, sensible configuration, very stable and versatile. And, one thing that is highly appreciated, I've never seen it do something I wasn't expecting it to. This quality of minimal surprises in its operation isn't going unnoticed by any measure.

There are some edges that were still a bit rough at least in 1.8. In particular, the way it handles reloading state from the state file, and the interactions with that state and the configuration file.

I don't remember the exact details, but the allowed formats of some identifiers were different, and it didn't do "the obvious thing" when the configuration and state file contained a different set of definitions, IIRC. This was consistent, but not very well documented.

It works fine for us now, so we like it, of course, but it took some production incidents to figure out how it all worked. (We did test before shipping, of course, but these were hard-to-predict edge cases.)

Re: Haproxy 2.2

#53

Earlier quoted context omitted.

Why do you choose HAProxy over Ngxinx? It's sounds like you love it, and I have had no experience with HAProxy. So I'm curious about the reasons you love it. (Just to be clear this is a sincere question to learn since tone is hard to express clearly with text.)

As a load balancer, NGINX is subpar in almost every feature comparison, especially at the open-source (free to use) tier. HAProxy gives you the following that are musts for load balancing (in my opinion), that NGINX does not, at least not easily: 1) A HTML (or JSON) stats page that precisely and completely tells you what’s going on at a high-level. A visit to this during outages is often all that’s required. 2) Suppo…

HAProxy - traffic shaping { load-balancing, req-throttling, health-checks }

nginx - { static file serving, good proxy for python/ruby apps, req manipulation with advanced scripting capabilities via lua engine through open-resty [mirroring, WAF(naxsi), url rewriting etc] }

A combo of haproxy + nginx would always bring good delight for many practitioners.

Re: Haproxy 2.2

#54
post #53

Earlier quoted context omitted.

As a load balancer, NGINX is subpar in almost every feature comparison, especially at the open-source (free to use) tier. HAProxy gives you the following that are musts for load balancing (in my opinion), that NGINX does not, at least not easily: 1) A HTML (or JSON) stats page that precisely and completely tells you what’s going on at a high-level. A visit to this during outages is often all that’s required. 2) Suppo…

HAProxy - traffic shaping { load-balancing, req-throttling, health-checks } nginx - { static file serving, good proxy for python/ruby apps, req manipulation with advanced scripting capabilities via lua engine through open-resty [mirroring, WAF(naxsi), url rewriting etc] } A combo of haproxy + nginx would always bring good delight for many practitioners.

This is actually what I often recommend and often encounter in field: haproxy for LB, varnish serving as a smart cache, and nginx for the applications+static file serving.

All 3 components are free, combine extremely well because they've grown together, and are extremely efficient. This is important in virtualised or containerized environments where you want to save resources to minimize response time and leave the CPU for the applications.

Of course each of them can do a little bit of the other ones' job. This is fine, it allows easier initial deployments, but as your site grows, whichever you initially start with, you'll always end up installing the two other ones to constitute the most robust stack ever. And it's easy to insert one next to the others without having to break everything, which further adds to the fun.

Re: Haproxy 2.2

#55
post #49

I love HA Proxy, but one thing I'm confused about is why the http-tunnel feature was removed in this release (and deprecated in earlier 2.x releases). http-tunnel allowed you to start a session with an HTTP request/response, then keep the socket to the backend alive without further inspection of the protocol. This is useful for things like RTSP where you kick things off with HTTP but then stream lower level TCP conte…

> why the http-tunnel feature was removed in this release From the haproxy 2.0 documentation: > This mode should not be used as it creates lots of trouble with logging and HTTP processing. And because it cannot work in HTTP/2, this option is deprecated and it is only supported on legacy HTTP frontends. In HTX, it is ignored and a warning is emitted during HAProxy startup. As for a way to handle this, I believe if you…

There is a bug in 2.2 which prevents websockets (and other tunneling protocols?) from working[0]. Maybe what the OP is running into.

[0] https://github.com/haproxy/haproxy/issues/737

Re: Haproxy 2.2

#56

Haproxy is brilliant, we've used it for years as a simple mesh on all our services, but we're considering moving to envoy as we need opentracing support to help understand how requests flow between services. Anyone managed to make this work on haproxy?

There's an opentracing integration coming very soon! We were hoping to have it available with the 2.2 release but there were still a few things to finalize.

Re: Haproxy 2.2

#57
post #53

Earlier quoted context omitted.

HAProxy - traffic shaping { load-balancing, req-throttling, health-checks } nginx - { static file serving, good proxy for python/ruby apps, req manipulation with advanced scripting capabilities via lua engine through open-resty [mirroring, WAF(naxsi), url rewriting etc] } A combo of haproxy + nginx would always bring good delight for many practitioners.

This is actually what I often recommend and often encounter in field: haproxy for LB, varnish serving as a smart cache, and nginx for the applications+static file serving. All 3 components are free, combine extremely well because they've grown together, and are extremely efficient. This is important in virtualised or containerized environments where you want to save resources to minimize response time and leave the C…

Yes. We use all three at different points of the stack for different purposes.

It's great.

Re: Haproxy 2.2

#58
post #14

Earlier quoted context omitted.

> looks like it was designed in the 90s. I think plenty of HNers will see that as a positive aspect.

I understand the nostalgia or liking the retro look, but the site is completely unreadable in mobile. There is absolutely no redeeming quality in that. Claiming that an unreadable version of a site is better than a readable one is simply wrong.

Maybe they're not using it on mobile?

Re: Haproxy 2.2

#59

Earlier quoted context omitted.

Why do you choose HAProxy over Ngxinx? It's sounds like you love it, and I have had no experience with HAProxy. So I'm curious about the reasons you love it. (Just to be clear this is a sincere question to learn since tone is hard to express clearly with text.)

As a load balancer, NGINX is subpar in almost every feature comparison, especially at the open-source (free to use) tier. HAProxy gives you the following that are musts for load balancing (in my opinion), that NGINX does not, at least not easily: 1) A HTML (or JSON) stats page that precisely and completely tells you what’s going on at a high-level. A visit to this during outages is often all that’s required. 2) Suppo…

Wow that is very helpful. I am going to take a look now!

Re: Haproxy 2.2

#60
post #40

Earlier quoted context omitted.

Why do you choose HAProxy over Ngxinx? It's sounds like you love it, and I have had no experience with HAProxy. So I'm curious about the reasons you love it. (Just to be clear this is a sincere question to learn since tone is hard to express clearly with text.)

Why you chose Nginx over HAProxy? I see a lot of people preferring Nginx, but I can't understand why they are so fascinated about it and try to squeeze it where it has no place. Nginx is just a web server that has some load balancing functionality, it is sub par with HAProxy. I never seen people saying why are you using HAProxy instead of Apache, but Nginx load balancing functionality is closer to Apache than HAProxy…

I choose it because I have a lot of experience with Nginx, and none with HAProxy. So I set it up as a LB, and it worked for my needs (at least from what I can tell).

I will definitely checkout out HAProxy now.

Post reply on HN