Nginx 1.12.0 stable
nginx.org
nginx.org
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...
See https://www.nginx.com/products/on-the-fly-reconfiguration/
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-...
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.
https://nginx.org/en/docs/ngx_core_module.html#worker_shutdo...
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/
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?
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.
* https://www.nginx.com/press/nginx-carries-strong-business-mo...
1. Some of my smallest customers are actually lighthouse customers for the rest of their industry. When they can't afford a price-segmented "enterprise" feature then I miss out on their super valuable product feedback and word-of-mouth.
I've seen this pattern in sport, telecoms, public transport, k-12 education. About the only place I haven't seen it is the financial sector.
I have been both the customer missing out and the provider in this scenario.
2. If a large enterprise is prepared to buy many units, but won't use your high end features, they can just pay for the cheaper end unit. You likely just missed out on revenue. They may well have been interested in later adoption of your more sophisticated stuff, but because they bought the cheap product it'll never happen because at scale the cost step function of going up a tier is perceived super negatively. So you also miss out on feature adoption and product feedback.
I have only been the customer in this scenario. I have seen it in both the financial sector and government. It almost happens in healthcare, but they are easily manipulated into higher price segments by placing HIPAA compliance stuff there. NB: Personally I find that kind of manipulation to be toxically abhorrent and when I've been the customer used it as a red flag against doing business. Nonetheless it is common.
Overall-
To me, business strategy is all about the creation and capture of value. When you find a product model that creates a virtuous cycle between those two aspects of value, you likely have a winner.
The best example I can give validating my experience is AWS, where everyone can use everything on a pay-as-you-go basis. I have been both a customer and on the inside with AWS. The model is incredibly empowering for startups having access to this massive box of capability, and moreover enables enterprises to do long-term planning of feature adoption with price stability.
The only time I recommend charging more for an enterprise feature is because it costs you significantly more to deliver it and there is no other way to capture your share of the value created or use scale to drive down the marginal cost of delivery. A wise PM will want to separate that out into a separate product. A classic example is providing a TAM over and above your hopefully already universally excellent support desk.
The counter-example to this point of view might be Slack. I cannot fathom why they both tier their capabilities and then charge per seat. Hard to see how SSO and AD sync adds to marginal cost per customer seat, and the storage and uptime promises are similarly paper thin value adds. It is one of the reasons I never recommend them. Yet they are apparently successful, perhaps because their product is crack for dev teams.
So execution certainly still matters. And no doubt other counter-examples can be easily found. But if you want to maximise your market engagement, it is essential to know how your customers behave in the product selection process in response to the signals you give them.
Sorry that was more than one sentence. I was waiting for a compile.
I don't get why parent got down-voted. He is absolutely right. What's wrong with the confused downvoters?
AFAIK the Plus version is just not something people care about but its also never had any impact on the open source one. And as a strong advocate of open source I find it extremely annoying when users find reasons to complain about friendly models for monetization of such software. :/
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.
But if load balancing is your killer feature, maybe it is the wrong choice.
It's less critical for a web server doing only one thing (a static folder or a single app). However, you still can't get metrics like time to load a page, connections per second, cache hits, error rates, etc... because nginx doesn't expose its metrics (for use by graphite/statsd and equivalent). Metrics are a paid feature, $1900 per server :D
Or look in the logs. Or have your monitoring system tell you what is down, the moment it goes down?
It's a good feature, it's not an absolutely critical stop the world women and children first feature.
By the way, nginx doesn't format logs properly. You think that a HTTP status code is a number? Nginx will give you "-" or "503,503" as well. Not sure if the paid edition have correctly formatted log.
Your monitoring system can't integrate with nginx. nginx doesn't expose its metrics as I just said in the last message. You need to pay nginx plus.
A poor man's solution could be a bash while loop with wget and sleep, hitting the actual servers or just the nginx frontend. A better solution would be any one of the hundreds of monitoring systems you can pick from that do exactly that, and integrate with nginx.
And yes, those are valid values for status codes. A tad surprising at first perhaps.
Nginx exposes logs. Your monitoring system can handle those logs. A simple tail and a grep for 'Upstream server failed' in the error log would be fine. Better than manually opening some custom gui that offers the same info, just in a worse format you can't work with.
It's considered a black box because it's a black box. A hobbyist would learn to use the status page from time to time, if there was a status page. Instead, he's learning that software are black boxes and won't look for status page in his next endeavour.
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.
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. :)
`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?
location /foo/ {
...
post_action @mirror_request;
}
location @mirror_request {
proxy_pass ...;
}Once that's done, I'd definitely be disappointed if web servers still decide it's not in scope for their core product.