120 points · by ymse · 9y ago · 76 comments
You can interact with haproxy via lua[1] or use etcd to have traefik load its configuration[2].
Seeing how [as others also mentioned] nginx seems to favor pro customers in terms of functionality, it would only seem wise to choose another proxy/load balancer for your next project.
[1]: http://www.arpalert.org/src/haproxy-lua-api/1.7/#Proxy.serve...
There are projects like the one I'm working on [3] that implement dynamic proxies using OpenResty.
[1]: https://github.com/openresty/lua-nginx-module [2]: https://github.com/openresty/lua-nginx-module#balancer_by_lu... [3]: https://github.com/3scale/apicast/
HAProxy reloads don't interrupt existing connections (unless you want it to).
There is a ~microsecond downtime in accepting new connections. https://engineeringblog.yelp.com/2015/04/true-zero-downtime-...
https://nginx.org/en/docs/ngx_core_module.html#worker_shutdo...
Or paying $2500/instance/year for nginx plus.
Maybe nginx isn't better than haproxy for many purposes. But updating configuration isn't the reason :)
If you're at a scale where logging into each server from your control node 'hurts', then you're still going to hurt with all the config other than nginx anyway.
See https://www.nginx.com/products/on-the-fly-reconfiguration/
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html#m...
I also use it as a frontend to all local dev
It does one thing and does it well - auto configured and discoverable lb and proxying designed to run in container environments
Easy to get running, easy to know everything it can do and without much effort it gets a lot accomplished
Not that nginx and HAProxy still don't have their place, but if you want to front a docker swarm or k8 stack traefik is just easy whereas nginx/haproxy have to be configured for that task
You get only so much with "ngx_http_stub_status_module" that you have to compile in yourself, as distros don't compile it in: https://nginx.org/en/docs/http/ngx_http_stub_status_module.h...
With Nginx plus you get access to so much more ("ngx_http_status_module") of the server status. It's not about the pretty frontend, it's about the values.
http://nginx.org/en/docs/http/ngx_http_status_module.html
Why isn't there a CentOS-style distro apt/rpm package of Nginx (think of free RedHat) with the status module enabled, as based on open source Nginx?
I don't get why parent got down-voted. He is absolutely right. What's wrong with the confused downvoters?
https://www.nginx.com/amplify/
The agent is open source and available here:
https://github.com/nginxinc/nginx-amplify-agent
If you have a minute, could you give it a try and provide some feedback via Intercom in our UI? User feedback is useful for driving feature as well as product directions.
Disclaimer: I work at NGINX on the Amplify project.
It would be a good move to open up the status module (release it as open source), and promote such a SaaS analytics product based on it with some error log scanning (like you try to do).
Debian compiles it in, so a lot of things that base of Debian would have it as well.
It makes it impossible to track issues when you cannot see what servers are online or offline and what's going on.
I'd recommend to forbid using nginx for load balancing at your companies, only use HaProxy.
I feel they chose rather well with status pages–it's a feature that's useful, yet leaving it out doesn't cripple the OSS version in most use cases.
I don't think you realize how important are status pages. That's like the single most important feature in a load balancer, after the load balancing itself.
You cannot perform any troubleshooting without it. You cannot see servers which are online or offline. You can't see what or how many users are online and where. You can't have statistics, bandwidth, connections, health checks... nginx is a black box.
Paying for nginx is a short term solution that causes more troubles. Next you have to count licenses and distribute license keys and use the paid installer from a special source. The long term solution is to ban nginx and use HaProxy instead, same stuff without paywalled features.
If I want to put money on something, it's going to F5 or NetScaler, or ELB, or Google load balancers, or Akamai, or Cloudflare. Not nginx.
The code of ngx_http_status_module isn't open source (as far as I know). Getting access to it means you need an Nginx Plus license. Someone packaging that up and distributing it for free would be a rather big violation.
Concrete example; Fabio is far more resilient to operator mistakes then our own NGINX Consul template duct tape solution (which is totally unforgiving).
Disclaimer: I'm the author.
> *) 1.12.x stable branch.
Well, thank you very much, that's a very informative changelog. :)
location /foo/ {
...
post_action @mirror_request;
}
location @mirror_request {
proxy_pass ...;
}`local response = ngx.location.capture("/some/api/endpoint" )`
I would not recommend doing this, though. Nginx internals are rather complicated in my experience.
So better off to just log to a file and monitor the tail of that and send the data off with a seperate script?
Once that's done, I'd definitely be disappointed if web servers still decide it's not in scope for their core product.