Edit(2): Now using db-mysql with generic-pool module. The error rate has dropped significantly and hovers at 13% but the throughput is still around 100 req/
One thing to consider is the driver - performance to databases can be very tied into the specific driver you are using. The most popular mysql driver and the one that is the most actively maintained is https://github.com/felixge/node-mysql. Might get different results with that.
But if you are stuck at 100 connections, sounds like connections are not being properly closed. I might add a console.log statement in the pools destroy event to make sure it really is executing.
100 connections is the default setting for MySQL maximum number of connections.
So somehow your connections aren't being reused for different requests. Probably you already have one query running on each connection.
Maybe the nodejs MySQL library you are using will not queue queries on the same MySQL connection but try to open an other connection and fail.
This is a bad benchmark, it should be a simple "hello world", as thousands of benchmarks that prove that nodejs is the "hello world" server fastest of all time :D
Have you enabled APC with PHP?
Can you try to enable persistent connections with PHP? e.g.
$conn = new mysqli('p:localhost', 'root', 'password', 'v3edb2011');
Correct me if I'm wrong, but I feel like you are overlooking something: Node uses a single process to handle every request (and handles them through events, still the same process), while php gets a new process (thread) for every request.
The problem with this is that the one process from node sticks to one core of the CPU, and PHP gets to scale with all four cores through multi-threading. I would say that with a Quad Core 2.x GHz processor, PHP would definitely have a significant advantage over Node just through being able to utilize the extra resources.
There is another discussion giving some information about how to scale Node over multiple cores, but that has to be done explicitly through coding. Again, correct me if I'm wrong, but I don't see any such code in the example above.
I'm pretty new to Node myself, but I hope this helps you improve your test :)
Aren't you using 10 maximum MySQL connections in Node.js, and 5000 maximum MySQL connections via PHP?
While you run your tests on either system, I would take a look at MySQL's "SHOW FULL PROCESSLIST".