Tech Humor: Apache vs Node.js vs NGINX 📺
Here's the transcript. But you should watch the video first. Reading the text won't be fun.
And in conclusion, we have found Apache to be excellent server for our web applications. Any questions?
Yes. I have a question. Why didn't you use Node.js. Node.js is an event driven non-blocking IO server, that can be used to build high performance web applications.
That is an excellent question. We evaluated several alternative web servers, and concluded that, while options like Node.js are very interesting, Apache meets our needs and has a solid track record.
But it doesn't have performance. Everybody knows that Apache applications are slow, because they use blocking IO and have context switches.
That's a commonly held belief, that threaded web servers are somehow less performant or scalable than event based servers. If fact, if you measure carefully, you'll find that both models have similar performance charasteristics.
Threads don't scale, simple as that.
That may have been true 10 years ago, it's not true today.
Node.js will run circles around Apache, because Apache was build before async was discovered.
This is where I'd typically stab myself repeatedly in the ears with a fork until I stop hearing you.
I've looked at Node. It uses a single threaded loop that dispatches events to handlers. It's a proven model that solves some concurrency problems, but at the cost of code complexity.
It gives techies like me the control, to wring every last CPU cycle out of our servers.
I'm a total speed junky.
Do you know what this reminds me?
The invention of the transistor.
It reminds me the invention of threads. Threading libraries do exactly what you are doing manually. They break up pieces of code to be executed intermittently, switching from instruction that are waiting on IO, to instructions that are ready to run. But your sequential code stays intact. You may recall sequential code. That's the code you can read.
But it's slow as a dog.
But it's fast as hell.
If you are willing to suffer complex code for performance, why not write an Nginx module in C?
Node.js is the most bad ass rock star tech to come out, since Ruby on Rails.
As much as I want to be optimistic and look forward to human progress, people like you stop me dead in my tracks. You are fanatic in the church of technology fashion. I could present you with fact after fact after fact that your thinking about asynchronous programing is completely wrong, but why bother when you equate technology to rock bands, fancy yourself a software hipster by wearing your Node T-shirt and celebrate horrible code. Maybe you're cool. Hell, maybe you have groupies, but when it comes to knowing what the f￼ck you are talking about, you have all facilities of a parrot that says non-blocking, over and over again.
Non-blocking, is the secret in the async sauce. With it, you go fast, without it, you go slow.
Do you know when human discovered that the world is round?
1492, Columbus sailed the ocean blue.
It was 240 BC, by a Greek mathematician named Eratosthenes. He conducted a simple experiment using the length of shadows and the distance between cities, to not only prove the earth is round, but also calculated its circumference.
It was utterly brilliant. But somehow, for one and half millennia, it was common knowledge that the world was flat, hundreds and hundreds and hundreds years of raft ignorance. How in m￼th￼rf￼cking hell does this happen?
It was you. You, who made claims about thread performance without measuring. You, who claimed hacking your code with a machete, turning it inside out into a twisted unrecognizable mess will somehow make it go faster. You, who spend your time alternating between problems that are already solved, and problems that don't actually exist.
You are the reason that science was set back a thousand years. The reason we've not cured cancer. The reason we've not solved world hunger.
It's because of you, m�th�rf￼cker, that we are not all using Lisp.
I'm sorry, what was the last part again?
Did you just say Lisp?
You misheard me.
I could've sworn you just said Lisp.
If there are no other questions, this concludes my presentation.
thanks to Ryuutei and penryu for help on transcription.
this video was made by Garret Smith (http://www.gar1t.com/, gar1t). Thanks to Garret for this wonderful video and full correction of my transcript.
If you have a question, put $5 at patreon and message me.