3 ms·
- node (whose main reason for existing is event driven IO) is in the same order of magnitude as nginx (whose main reason for existing is also event driven IO).
by nailer 8y ago
- node (whose main reason for existing is event driven IO) is in the same order of magnitude as nginx (whose main reason for existing is also event driven IO). I think sometimes people think node is ruby/python/php levels of performance. It isn't.
- And as another comment mentions, developer productivity may be better than minor performance difference - you mentioned Caddy, same rationale applies here.
- nginx is also a bit crippled as useful features (like dynamic reconfig) are only in the proprietary nginx plus.
- This has good defaults - having to set up the seperate webserver for ACME is a pain, this is way easier.
- rileymat2 8y agoDo you know of a performance benchmark that shows the current status? I can't find many that describe node not at those levels of performance, Especially against Ruby.
- nailer 8y agoSure: https://iwf1.com/apache-vs-nginx-vs-node-js-and-what-it-means-about-the-performance-of-wordpress-vs-ghost https://iwf1.com/apache-vs-nginx-vs-node-js-and-what-it-mean... I haven't seen anyone compare Ruby to node perf, unless there's a non blocking variant of Ruby (looks like nio4r), in which case it would have similar perf. Likewise node vs Python Tornado would be a good comparison. Thing is, nio4r and Tornado aren't the standard library. Whereas node's stdlib is: node's file and socket read operations etc are non blocking, Python and Ruby equivs are not. Also (addressing weird moderation - sudden downvotes when I mentioned other languages): please don't turn this into a lang tribal thing: I personally think Python is a better language than JavaScript, it just blocks by default. This isn't a matter of preference, it's a fact.
- rileymat2 8y agoThat resource looks like node is faster than those other languages? I think you might be getting the down votes because your comment is being interpreted that it is slower.
- sametmax 8y agoPython: we use the node event loop too now (https://magic.io/blog/uvloop-blazing-fast-python-networking/ https://magic.io/blog/uvloop-blazing-fast-python-networking/). But actually, you could have setup a pure Python server instead of nginx for the last 10 years with twisted. Not that you should not consider uring nginx anyway: it deals with caching, load balancing, has great tutorials, it's battle tested, and has tons of pluging. But performance wise, WSGI is not Python.
- nailer 8y agoSure, I mentioned Tornado a few minutes before you posted this. Twisted obviously counts too, I dislike the non-PEP8 coding style it uses but that's off topic. I love Python's non blocking features, they're just not in the mainline VM right now. Here's hoping for a libuv or whatever else non blocking Python 4 VM / stdlib.
- sreque 8y ago> I think sometimes people think node is ruby/python/php levels of performance. It isn't. Except, it is ruby/python/php slow: https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=json&l=zijv9b-1 https://www.techempower.com/benchmarks/#section=data-r17&hw=... All of PHP, Ruby, and Python beat Node.js in the above-linked benchmark.
- londt8 8y agoRaw number crunching performance is similar with Node and Go. Python and ruby are in different league than them. https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-node.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y agoDo you think this discussion or the OP is about "[r]aw number crunching performance" ?