News for hackers. Stuff that matters.
Re:Nginx 1.13 released with TLS 1.3 support by nerdbaggy on Tuesday April 25, 2017 @08:24PM (#14199494)
I don't understand why all these free open source projects are using nginx when it hides so many great features behind the premium option. HAProxy also has a lua module and you even has monitoring abilities for free unlike nginx

edit: a project like Kong could easily be done with haproxy as far as I know and you can actually monitor your server. https://getkong.org

Re:Nginx 1.13 released with TLS 1.3 support by newsat13 on Tuesday April 25, 2017 @08:43PM (#14199582)
I have been using nginx since forever for all my personal projects. I cannot say I have missed any feature not in opensource edition. In fact, I didn't even know they had a premium edition for a long time.

What killer feature do normal projects require that is not in opensource edition?

Re:Nginx 1.13 released with TLS 1.3 support by SteveNuts on Tuesday April 25, 2017 @11:00PM (#14200113)
per-vhost metrics is the big one for us. We're not going to pay $2,500 just to get them though.

If you enable the stub status, that gives you metrics for the master process and not any of the virtual hosts.

Re:Nginx 1.13 released with TLS 1.3 support by lebinh on Wednesday April 26, 2017 @01:37AM (#14200675)
I wrote something out of our need for better monitoring/metrics for Nginx here: https://luameter.com/ And quite a few people are using it for per-vhost metrics use case just like you said. Also if you prefer something simpler and open source I also wrote this https://github.com/lebinh/ngxtop
Re:Nginx 1.13 released with TLS 1.3 support by user5994461 on Wednesday April 26, 2017 @06:44AM (#14201965)
Second project is a hack that's reading log scripts.

That's not comparable to a proper monitoring page and exposing its stats by statsd (or similar) for integration with a real monitoring system.

nginx free edition is a black box, hence the criticism.

Re:Nginx 1.13 released with TLS 1.3 support by vbtechguy on Thursday April 27, 2017 @04:49AM (#14210106)
I've had basic nginx vhost stats in my Centmin Mod LEMP stack installer for ages - not as detailed but works https://centminmod.com/nginx.html#vhoststats. Using nginx module https://github.com/vozlt/nginx-module-vts

and TLS v1.3 works fine for me too https://community.centminmod.com/posts/48818/

Re:Nginx 1.13 released with TLS 1.3 support by tomschlick on Tuesday April 25, 2017 @08:44PM (#14199584)
Because Nginx "just works" and I don't think it's a bad thing that they are trying to make a living from all their hard work. Especially when the premium features are mostly stuff that businesses need.
Re:Nginx 1.13 released with TLS 1.3 support by coldtea on Wednesday April 26, 2017 @07:28AM (#14202127)
>I don't understand why all these free open source projects are using nginx when it hides so many great features behind the premium option.

Because the free version covers all the things they need, and they feel nginx creators also have a right to make some bucks?

Re:Nginx 1.13 released with TLS 1.3 support by nodesocket on Tuesday April 25, 2017 @10:09PM (#14199948)
I am more than willing to pay for NGINX Plus. It supports the authors and company that provides this amazing software. Expecting everything for free and open source is what I despise about the software industry. This anti-capitalist mentality causes great companies with amazing products to go out of business (see RethinkDB) and then everybody both entrepreneurs and developers lose.

Slava > And our users clearly thought of us as an open-source developer tools company, because that’s what we really were. Which turned out to be very unfortunate, because the open-source developer tools market is one of the worst markets one could possibly end up in. Thousands of people used RethinkDB, often in business contexts, but most were willing to pay less for the lifetime of usage than the price of a single Starbucks coffee (which is to say, they weren’t willing to pay anything at all).

Re:Nginx 1.13 released with TLS 1.3 support by sandGorgon on Wednesday April 26, 2017 @12:22AM (#14200408)
I wish there was a paid version without the heavy duty support cost built into it . The pricing scale up is massive. The cost of a single license in the lowest paid tier is 2500$.

I understand it's because of the support cost - but it makes the adoption very hard. You cannot go from 0$ to 10,000$ overnight. And that's the problem.

Re:Nginx 1.13 released with TLS 1.3 support by sbarre on Wednesday April 26, 2017 @06:44AM (#14201966)
If your business cannot afford (let's say) $10,000/year for Nginx Plus then your business is probably still in the phase where you replace that financial cost with labour and you roll your own similar setup using other tools, and you debug and fix the problems yourselves.

And if you're operating at the scale where this doesn't make sense, and you still can't afford $10k/year, then maybe you need VC money? ;-)

Re:Nginx 1.13 released with TLS 1.3 support by shawabawa3 on Wednesday April 26, 2017 @09:43AM (#14202835)
> If your business cannot afford (let's say) $10,000/year for Nginx Plus

At my previous business we wanted to use nginx plus, so we asked them for a quote saying we had between 10 and 50 servers running nginx per day (autoscaled depending on load)

We got back a short email saying it's $2500 per server, so $125000/year.

Considering our total hosting costs at this point were around $30-40k, that is absolutely absurd.

Re:Nginx 1.13 released with TLS 1.3 support by sbarre on Wednesday April 26, 2017 @11:51AM (#14204055)
Agreed! Sounds like this was not the solution for you...
Re:Nginx 1.13 released with TLS 1.3 support by sandGorgon on Wednesday April 26, 2017 @07:33AM (#14202142)
>your business is probably still in the phase where you replace that financial cost with labour and you roll your own similar setup using other tools, and you debug and fix the problems yourselves

That is stretch of a statement - maybe you are not entirely incorrect. But the onus is on both sides. I'm also at that stage where I can migrate to traefik or caddy relatively easily... but I dont mind paying 100$ to nginx for something familiar and an almost negligible incremental cost to them.

I am not claiming a magic bullet, but there's a reason why SAAS companies with easy switchability have a gradually increasing payment plan. Instead of heartburn inducing 0-10K USD.

Re:Nginx 1.13 released with TLS 1.3 support by susi22 on Wednesday April 26, 2017 @01:44AM (#14200717)
That's why I'm pretty excited about what agentzh bring to the table with the commercialization (just a few weeks old) of OpenResty Inc.
Re:Nginx 1.13 released with TLS 1.3 support by walterbell on Wednesday April 26, 2017 @06:23AM (#14201891)
Are they going to compete with Nginx premium features? From http://openresty.org:

> OpenResty® is not an Nginx fork. It is just a software bundle. Most of the patches applied to the Nginx core in OpenResty® have already been submitted to the official Nginx team and most of the patches submitted have also been accepted. We are trying hard not to fork Nginx and always to use the latest best Nginx core from the official Nginx team.

Re:Nginx 1.13 released with TLS 1.3 support by susi22 on Wednesday April 26, 2017 @10:29AM (#14203257)
No clue. It's not officially announced yet. He's just mentioned it on the mailing list.
Re:Nginx 1.13 released with TLS 1.3 support by vbtechguy on Thursday April 27, 2017 @05:00AM (#14210142)
indeed i am happy to see OpenResty Inc as i use alot of openresty modules i.e. lua etc for my own LEMP stack installer https://centminmod.com/ :)
Re:Nginx 1.13 released with TLS 1.3 support by vacri on Wednesday April 26, 2017 @01:05AM (#14200555)
If it wasn't for "open source mentality", the internet would have ossified in the 90s. People wouldn't be able to put up all the interesting individual sites that they do, and there'd be only a few major companies that could provide hosting. So many of the things we take for granted have grown out of side-projects that would never have taken off with a high barrier to entry that is commercial-grade software. Certainly the web wouldn't be as advanced as it is now, as 'vested interests' would have won far more frequently than 'pragmatism'. "Which DB do you use? MSSQL or Oracle?" - RethinkDB would never have gotten off the ground.

> because the open-source developer tools market is one of the worst markets one could possibly end up in

Well, a production-quality database isn't really a 'developer tool', but even then, there are dev tools that have carved out a comfortable niche for themselves, such as SublimeText.

The problem isn't the open source mentality, the problem for RethinkDB was competing in a saturated market with a major competitor who had already won a lot of mindshare and gained a lot of traction.

Re:Nginx 1.13 released with TLS 1.3 support by paulddraper on Tuesday April 25, 2017 @10:09PM (#14199945)
Nginx is more a web server. HAProxy is more a proxy/load balancer.

Those feature sets overlap, but HAProxy cannot serve files, cannot cache. OTHO, most Nginx load balancer features are premium.

Overall, I'd say Nginx has a broader range of features and friendlier configuration. Hence high adoption.

Anyone using HAProxy is serious about load balancing.

Re:Nginx 1.13 released with TLS 1.3 support by sethhochberg on Tuesday April 25, 2017 @11:17PM (#14200179)
For us at $day_job, consistency was also a nice bonus (we recently moved our web load balancers from Varnish to nginx plus, because now we have a single software package which does our SSL termination with HTTP/2, HTTP / TCP / UDP load balancing, serves static assets, caches, and is also the host for our application server itself, Passenger). Of course all of these functions happen across dozens of servers, but we get to use a single config syntax to make all of that happen and only need to track security issues, etc, for a single package.

Sure, we could accomplish all of that with some combination of haproxy and/or varnish and/or apache and/or nginx and/or various Ruby/Rack app servers... but we don't have to. Nginx does an acceptably good job of all of those things for our needs right now, and the support they provide for the license cost is pretty reasonable.

Re:Nginx 1.13 released with TLS 1.3 support by jbergstroem on Tuesday April 25, 2017 @08:54PM (#14199643)
I think its because nginx was (and for most, still is) generational [compared to apache] in terms of core features and ease of configuration. I can see how caddy would be the next alternative though: more – "modern" if you may – features (money quote: built-in letsencrypt) but more importantly even simpler configuration.

edit: This is also where your use case makes it easy to see why nginx (or caddy) won't cut it.

Re:Nginx 1.13 released with TLS 1.3 support by TheAceOfHearts on Tuesday April 25, 2017 @11:34PM (#14200233)
Neat, thanks for mentioning Caddy [0]. I hadn't heard about it before now, and just from looking over their docs it looks very promising.

Their website is superb, with simple explanations of what the tool does and transparent pricing for their paid options.

The only thing I'm initially a tiny bit weary about is their claim of it being production ready. Being used by thousands of sites is an amazing feat, but how big are the loads on these sites? Production-ready can mean completely different things depending on what you're building. I think it'd be a nice improvement to see a bit more data backing up that claim. Just from a quick google search it looks like there's a decent number of articles comparing it with nginx, so I guess I"ll stat digging in a bit deeper.

[0] https://caddyserver.com

Re:Nginx 1.13 released with TLS 1.3 support by mholt on Wednesday April 26, 2017 @02:41AM (#14200954)
Yeah, "production-ready" is definitely true about Caddy, but I know saying a program is "production-ready" is like saying a program is "secure" -- what does that even mean??

I like to tell people it's production-ready if it's a good fit for your website and workflow. Many people are using Caddy in production. There's so much variance it's hard to pin it down in a simple phrase, so we have to settle with a term that's "good enough", which I think the most fitting is "production-ready."

And upfront, I'll say: Careful with chasing benchmarks. They don't transfer well (or at all), and most people (including me) don't know how to run them properly. Just test with your own staging setups and see if it works well enough for what you need.

Anyway, thanks for your feedback about the site -- definitely taking it into account.

Re:Nginx 1.13 released with TLS 1.3 support by vbtechguy on Thursday April 27, 2017 @04:56AM (#14210132)
hey Matt https://community.centminmod.com/threads/caddy-http-2-server... oldies but i should revisit this as caddy is using Go 1.8 now
Re:Nginx 1.13 released with TLS 1.3 support by djvdorp on Wednesday April 26, 2017 @03:22AM (#14201101)
I think Caddy is doing a lot of things pretty great (including having a very large amount of cool features and a very simple configuration syntax).

However, honestly, I don't dare to use it on "big" production sites yet (besides maybe my blog), because for example packaging [0] still isn't tackled or clear at this point in time (and if Caddy wants to also gain traction on "big" production websites, this matters, because these are often not just run by devs, but sysops/devops people that will, very likely, never wget a binary because [insert one or more of valid reasons]). I think Matt (mholt) said that they will work this out when Caddy will hit 1.x, but for me it is a showstopper atm. Also if you read the topic from top to bottom you will notice that there seems to be no clear vision, not even for a base-caddy OS package or PPA.

Before this comment is considered negative, please know that I am actually a Contributor to the Caddy project (yet I have only contributed to the Init/Service Scripts), and a passive reader of the packaging discussion mentioned earlier, trying to come up with a great idea there to tackle that one point that I think will make Caddy's growth accelerate very quickly for "big" production websites.

[0] https://caddy.community/t/packaging-caddy/61

Re:Nginx 1.13 released with TLS 1.3 support by StavrosK on Wednesday April 26, 2017 @05:42AM (#14201722)
I agree with you 100%, this is the primary reason why we haven't deployed caddy for at least internal services where I work. I don't want to have to upgrade "everything and caddy" every time the update window rolls up.
Re:Nginx 1.13 released with TLS 1.3 support by coldtea on Wednesday April 26, 2017 @07:33AM (#14202140)
>The only thing I'm initially a tiny bit weary about is their claim of it being production ready. Being used by thousands of sites is an amazing feat, but how big are the loads on these sites?

Well, you can always add more boxes.

People have been putting horrendously performing Ruby or other small-time servers in production for very mainstream sites.Compared to things like these, Caddy will soar...

Re:Nginx 1.13 released with TLS 1.3 support by vbtechguy on Thursday April 27, 2017 @04:54AM (#14210120)
caddy doesn't scale or handle high traffic as well as nginx does from my benchmarks and understandably as caddy author has stated, he's focusing on features first then performance. benchmarks caddy vs nginx - caddy uses up to 3x times more cpu and memory resources and 1/3rd the performance of nginx https://community.centminmod.com/threads/caddy-http-2-server...
Re:Nginx 1.13 released with TLS 1.3 support by JTenerife on Tuesday April 25, 2017 @10:04PM (#14199927)
Informations about HAProxy on multi-core hardware (TLS de- and encryption are CPU bound) are a bit discouraging. You can assign workers to cores, but there's no shared memory and therefore the official docs warn about some inconsistencies that might occur. There doesn't seem to be a consensus wether to use the multi-core feature or not. Also nginx supports http/2.

Regarding the status of the backendservers - I use monitoring with health checks for every backend server anyway.

That are the reasons I chose nginx as reverse proxy recently.

Re:Nginx 1.13 released with TLS 1.3 support by jonathanoliver on Tuesday April 25, 2017 @11:25PM (#14200207)
We've had great success with HAProxy on multi-core without the warnings. The Stack Exchange operations did a blog post about an easy way to do it. Here's a sample config that does multi-core processing really well: https://gist.github.com/joliver/40291313605971545a0c1f6a3040...
Re:Nginx 1.13 released with TLS 1.3 support by doubleplusgood on Wednesday April 26, 2017 @04:25AM (#14201385)
Does the stats endpoint reflect stats for all processes?
Re:Nginx 1.13 released with TLS 1.3 support by jonathanoliver on Wednesday April 26, 2017 @09:15AM (#14202651)
Yes, it aggregates stats for all endpoints.
Re:Nginx 1.13 released with TLS 1.3 support by doubleplusgood on Wednesday April 26, 2017 @11:07AM (#14203576)
Perhaps I mis-remembered that it would only work for one of them. Haven't used HAProxy in a while.
Re:Nginx 1.13 released with TLS 1.3 support by user5994461 on Wednesday April 26, 2017 @06:50AM (#14201998)
There is definitely a single right consensus on how to do high performance TLS load balancing (irrelevant of the software):

- Create 1 process per core and pin to a core.

- In extreme cases, pin the NIC interrupt to a dedicated core. (If you have multiple NIC, one dedicated core per NIC).

HAProxy lets you do that very easily. That's why it's configured the way it's configured, because it's the options you need to make a high performance load balancer.

Shared memory is not necessarily and would kill the performances dramatically. The "inconsistencies" you might have heard about mean that the stats in the stats page are approximate, nothing important.

Re:Nginx 1.13 released with TLS 1.3 support by codinghorror on Wednesday April 26, 2017 @12:55AM (#14200525)
Lack of http/2 on haproxy by now is terribly limiting and very disappointing.
Re:Nginx 1.13 released with TLS 1.3 support by sofaofthedamned on Wednesday April 26, 2017 @07:10AM (#14202074)
Agreed, and I can find no roadmap for it. It's a real shame.

I'm looking at moving to something a bit more application aware now, such as Traefik, which works better in my workflow anyway.

Will say though - HAProxy has been rock solid for me, and was a million times easier to configure and manage than F5 LTM for our use case.

Re:Nginx 1.13 released with TLS 1.3 support by jimktrains2 on Wednesday April 26, 2017 @08:04AM (#14202264)
I wonder if that's because it may have to decode all the data going over the pipe to figure out where headers are? As it stands HAProxy only looks at and modifies HTTP headers and passes the body right on through without touching or modifying it.
Re:Nginx 1.13 released with TLS 1.3 support by throw2016 on Wednesday April 26, 2017 @02:50AM (#14200983)
I agree with you in principle, ideally there should be no feature separation but supported versions.

But given the current culture of even large profitable companies just using open source projects without giving back - see the HN story about Github and Redis - and let alone contributing but even giving credit, some open source companies have no way to earn any revenue. They may then have to resort to this to support their development which ultimately benefits all users.

Nginx is a highly regarded, widely used and high performance web server. As a long time user I would not grudge them trying to make some money to support and improve the project. As is Haproxy. I think there is room to accommodate both models and we are just incredibly lucky to have 2 such high performance projects available as open source.

Re:Nginx 1.13 released with TLS 1.3 support by viraptor on Tuesday April 25, 2017 @08:43PM (#14199577)
Because you rarely need those premium options. And when you're big enough to need it, you can pay. Sounds like a win-win to me.
Re:Nginx 1.13 released with TLS 1.3 support by jnsaff2 on Wednesday April 26, 2017 @02:51AM (#14200991)
I wanted to like HAproxy but the lack of support for in-place zero downtime config reloads without resorting to witchcraft was a showstopper. Use case for us a service discovery load balancer for Mesos/Marathon where frontend/backend config can change as often as every few seconds. Never had any issues with nginx.
Re:Nginx 1.13 released with TLS 1.3 support by kawsper on Wednesday April 26, 2017 @03:43AM (#14201204)
Could you elaborate on how you use Nginx as a service discovery load balancer?
Re:Nginx 1.13 released with TLS 1.3 support by jnsaff2 on Wednesday April 26, 2017 @06:30AM (#14201916)
I think most of the ideas are presented here: https://github.com/martensson/nixy

In essence there is a wrapper that:

- reads service information and current backend instances out of service catalog (either Marathon or Consul)

- writes nginx configuration

- runs nginx configtest

- tells nginx to reload its configuration

Nixy referenced above takes service information directly from Marathon event stream but I usually have Consul so I use homebaked consul-template + nginx solution.

Re:Nginx 1.13 released with TLS 1.3 support by user5994461 on Wednesday April 26, 2017 @07:00AM (#14202036)
>> where frontend/backend config can change as often as every few seconds

That's a red flag. Don't make architectures where you depend on crazy requirements like that.

Re:Nginx 1.13 released with TLS 1.3 support by jnsaff2 on Thursday April 27, 2017 @04:34AM (#14210053)
Ok, I will go tell the 200 or so developers that they can only deploy to test/staging once an hour or so instead of, like .. whenever they need.

This is a PaaS supporting many micro-services. There is a hold-off to not reload more than once a second just as an insurance against runaway processes but beyond that nginx handles this without any sweat.

Frequent reloads are currently in the non-prod cluster only but I don't see any reason why it would be an issue in prod as well.

Re:Nginx 1.13 released with TLS 1.3 support by user5994461 on Thursday April 27, 2017 @07:08PM (#14215600)
Depends what you handle. Some services really don't like being forcefully disconnected and not everything is a short lived HTTP(S) request.

P.S. I am in finance, assume my requirements are severely more extreme than yours. Just like my errors.

Re:Nginx 1.13 released with TLS 1.3 support by jnsaff2 on Wednesday May 03, 2017 @06:39AM (#14254499)
That's why we switched to nginx as it is perfectly fine reloading configuration without dropping existing connections. HAproxy can not do that. There is a black magic approach to having two HAproxies listening on the same port so there would always be something listening and connections could be drained, but it's dicey.
Re:Nginx 1.13 released with TLS 1.3 support by m-p-3 on Tuesday April 25, 2017 @09:12PM (#14199721)
So far, my usage never required any of the premium options. And I suppose a corporation can afford to pay those if needed and support the development.
Re:Nginx 1.13 released with TLS 1.3 support by ptman on Wednesday April 26, 2017 @08:18AM (#14202337)
There exists Tengine, a fork of nginx, which IIRC features some of nginx paid features for free. I wonder how closely it tracks nginx and what the differences are

http://tengine.taobao.org/

https://github.com/alibaba/tengine

Re:Nginx 1.13 released with TLS 1.3 support by feld on Tuesday April 25, 2017 @09:31PM (#14199800)
You could say the exact same thing about Varnish. In fact I say your money would be better spent on premium Varnish than on premium Nginx.
Re:Nginx 1.13 released with TLS 1.3 support by felipelemos on Tuesday April 25, 2017 @10:54PM (#14200094)
But varnish lacks some features like dns-backend-resolution that are essential on modern microservices world.
Re:Nginx 1.13 released with TLS 1.3 support by boyter on Tuesday April 25, 2017 @11:57PM (#14200327)
I keep hearing this as being an issue but when I suggest slinging some money at the guy creating it I never get a response.

Apparently its a big enough issue to grumble about but not big enough to front some cash to resolve.

I agree though. DNS backend lookups for this would be an excellent thing to add.

Re:Nginx 1.13 released with TLS 1.3 support by ruben_varnish on Thursday April 27, 2017 @08:44AM (#14210993)
Re:Nginx 1.13 released with TLS 1.3 support by feld on Wednesday April 26, 2017 @08:42AM (#14202448)
I'm not entirely sure what this is about. Are you saying the list of backends is dynamic and retrieved from DNS? Why would you do this? Why are the backends changing so frequently? This seems like a major design issue. Why not have one backend that's anycasted with equal priority and you can pop backends in and out as you please?

Also, why wouldn't you just solve this with SRV records? Just patch Varnish to support SRV properly and magic you get everything you ever wanted including failover and priorities. That's probably a more sane request.

Re:Nginx 1.13 released with TLS 1.3 support by felipelemos on Thursday April 27, 2017 @12:23AM (#14209151)
AWS ELB as backend for example.
Re:Nginx 1.13 released with TLS 1.3 support by kev009 on Tuesday April 25, 2017 @11:12PM (#14200163)
nginx is nearly optimal for content serving (see Netflix presentations) and TLS origination or termination. It's actually somewhat weak in the features they charge for.
Re:Nginx 1.13 released with TLS 1.3 support by therealmarv on Wednesday April 26, 2017 @04:42AM (#14201468)
When it is so easy to do in haproxy why nobody has done it? (which proofs it's not so easy)
Re:Nginx 1.13 released with TLS 1.3 support by jimktrains2 on Wednesday April 26, 2017 @08:02AM (#14202250)
nginx can do a lot more than HAProxy. Don't get me wrong, for what it does HAProxy is fast, stable, and wonderful, but it's not a cgi or page server.
Re:Nginx 1.13 released with TLS 1.3 support by stephenr on Tuesday April 25, 2017 @09:18PM (#14199746)
You clearly aren't a me-too cool kid.

Most tech decisions these days seem to be more about cargo culting than actual suitability for the task.