3 ms·
HAProxy is typically used as a load balancer, much like ELB. But you can also use HAProxy like Nginx as a web server. I don't do that, but I am willing to exper
by yeukhon 11y ago
HAProxy is typically used as a load balancer, much like ELB. But you can also use HAProxy like Nginx as a web server. I don't do that, but I am willing to experiment.
> What we do internally where I work is the following: our application servers all listen only on a secure internal network and accept incoming connections only from our 'gateway' server. All simple HTTP over port 80. The 'gateway' servers run just Nginx and nothing else. They staple SSL and HTTP/2 on top of the forwarded requests to application servers.
Very typical setup. Although in some companies they encrypt traffic all the way through (bad if you want to make sense of your tcpdump).
Did you encounter any issues after switching to HTTP/2 or during the process of switching over?
- Ambroos 11y agoI do see the point in using HAProxy as a loadbalancer, we use it too (in a different setup without SSL), but in the context of this tutorial it's usage doesn't seem warranted when you're already running Nginx. We've had literally zero issues after switching to HTTP/2, and we had none when enabling SPDY early 2015 either. Since we have integrated Let's Encrypt with automatic renewal in our provisioning we've even gone back to old websites and retroactively enabled HTTPS just to benefit from HTTP/2 and the response from clients and users has been either positive or absent. The most annoying part was finding a good solution for the HTTP/2 / ALPN / NPN problem. With OpenSSL 1.0.1 Nginx will negotiate HTTP/2 just fine, but over NPN only (which Chrome is dropping soon). We wanted to avoid compiling our own Nginx with every OpenSSL update too. In the end settling on Debian unstable proved to be easy and by far stable enough to simply run Nginx.
- yeukhon 11y agoWhy not add ppa and get the latest official Nginx and OpenSSL?
- Ambroos 11y agoI didn't find any good repositories with Nginx 1.9.5+ and OpenSSL 1.0.2 statically linked that I found trustworthy enough. Going with Debian Stretch/Unstable was possible without making any changes to our provisioning scripts (all targeted at Debian Jessie) and has proven to be more than stable enough to function as a gateway.
- ryzy 11y agoHi yeukhon - thanks for comment. No issues so far with prototypebrewery.io, but it's just couple of days since we switched. We don't have massive traffic there and 99.9% is from newest modern browsers. Still, I hope with fallback to HTTP/1.1 we're safe, don't you think?