Nginx directly to mysql. 3 - 4 times as fast as php + libmysql
nginx.org
nginx.org
"We even observed that ngx_drizzle + ngx_rds_json achieved 128MB/sec (Yes, 1024Mbit/sec!) for a 380KB data-set query while connecting to a simple mysql server, about 3 ~ 4 times as fast as php + libmysql in this setting."
As you can imagine in such scenario (380KB result), MySQL engine is taking the most of the time.
You're adding a tremendous amount of overhead with any high level language stuck in between the connect and the data source.
This is about as basic as it gets, not worthy of #1 item on hacker news.
You are right of course. But what would be nice would be to replace part of a static page with the result of a piece of SQL. To combine ESIs with MySql so that you can serve static files and still be able to add things like watermarks using a MySql lookup based on a session cookie.
I still don't understand why this is on hacker news, let alone the top of the list.. seems to be about the most obvious item of all..
disappointing
And I don't see why you would bother, ASP.Net is compiled, it's not exactly a performance hog, unlike PHP.
I just hope they aren't being used as public-facing JSON API endpoints and the such, since none of them seem to even consider the case of SQL injection. From a quick glance it doesn't seem that any type of parameterized query or prepared statements are available to even begin helping with that, and the "documentation" examples wouldn't be setting people off on the right foot by even limiting the location paths with strict regex's.
I'm sure people will still mess things up :)
Taobao.com (14th biggest site in the world, 3rd in China - according to Alexa) is using ngx_drizzle + ngx_rds_json in production. Qunar.com is using ngx_postgres + ngx_rds_json.
This just makes it a little easier to put together a RESTful app. Alot of those apps are just thin wrappers around the request that check the request type, check authentication, and then perform a simple db statement. This is easier to define, and apparently alot faster.