Node.js Versus Nginx: Bare Bones Test
To do this test, I simply installed Nginx on my Windows 7 laptop to ensure the playing field is level and copied the HTML file created for Apache to my Nginx web root.
I then proceeded to re-run the simple speed tester on both the Node and Nginx applications, respectively.
I was much more pleasantly surprised in the results this time. I ran the test multiple times because it was so close and each time both the Node and Nginx website ran over 6,700 times. It would swap between Node winning by 20 results than Nginx winning by 20 results. At the end, I would have to call it a tie since the results were always within +/- 20 of each other!
I would be curious to include php5-fpm and redo this test because at this stage I feel that Node would step out as more of the clear leader because Node is already doing some full circle processing where-as Nginx is just loading a plain jane HTML page…
Unlike Apache, Nginx seemed to be quite respectable when comparing against a basic Node.js application. Which of course makes a lot of sense since the concepts behind them are somewhat simpler unlike Apache which follows a more blocking pattern when loading web pages.