[nodejs] Why siege test showing PHP is performing better than Node

2015-02-18 Thread Anirban Bhattacharya
Hi, I am new to node. very new ..like infant. Either I am doing something wrong or I understood everything wrong. I wrote a node js simple JSON emitter which uses mysql module and query (select *) from a single table haviing 100 records and outputs on page as JSON (JSON.stringify.. I wrote a PHP

[nodejs] Why siege test showing PHP is performing better than Node

2015-02-21 Thread Tom Boutell
This code is asking mysql to do a lot of work and then doing almost no work in node or PHP. In such a scenario both programs will get tweaked until they run the optimal number of simultaneous mysql queries on this particular server, whatever that is- but it will teach you nothing about node ver

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-18 Thread Aria Stewart
> On Feb 18, 2015, at 1:34 PM, Anirban Bhattacharya > wrote: > > Hi, > I am new to node. very new ..like infant. > Either I am doing something wrong or I understood everything wrong. > I wrote a node js simple JSON emitter which uses mysql module and query > (select *) from a single table havi

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-18 Thread Anirban Bhattacharya
This is my node code var http = require('http'); var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'root', password: '' }); connection.connect(function (err){ if(err){ console.log('error!!!'+err.stack); return; } con

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-18 Thread Aria Stewart
> On Feb 18, 2015, at 1:53 PM, Anirban Bhattacharya > wrote: > > This is my node code > > var http = require('http'); > var mysql = require('mysql'); > var connection = mysql.createConnection({ > host : 'localhost', > user : 'root', > password: '' > }); > This cr

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-19 Thread Anirban Bhattacharya
Thanks a lot...any suggestion to modify the node code of mysql connection...where to move it so that it works the same way as of the PHP code? On Wed, Feb 18, 2015 at 4:01 PM, Aria Stewart wrote: > > > On Feb 18, 2015, at 1:53 PM, Anirban Bhattacharya < > anirbanbhattacharya1...@gmail.com> wrote

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-19 Thread Andrey
On Thursday, 19 February 2015 09:01:42 UTC+11, Aria Stewart wrote: > > > > On Feb 18, 2015, at 1:53 PM, Anirban Bhattacharya < > anirbanbhat...@gmail.com > wrote: > > > > This is my node code > > > > var http = require('http'); > > var mysql = require('mysql'); > > var connection = mysql.c

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-20 Thread Ryan Schmidt
Why did PHP transfer so much less data than Node in your tests? On Feb 20, 2015, at 1:29 PM, Anirban Bhattacharya wrote: > > So, > > I made changes to code of node. > > 1. I removed that extra query for use data base and added in connect > paarmeter. > 2. I changed it to createPool. But still

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-21 Thread Anirban Bhattacharya
Seriously? A just select query is considered as so much db operation for a web app? Ok tell me how to create test scenario ? A hello world will do? On Feb 21, 2015 2:46 PM, "Tom Boutell" wrote: > This code is asking mysql to do a lot of work and then doing almost no > work in node or PHP. > > In

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-21 Thread Tom Boutell
On Feb 21, 2015 3:57 PM, "Anirban Bhattacharya" < anirbanbhattacharya1...@gmail.com> wrote: > Seriously? A just select query is considered as so much db operation for a > web app? > Ok tell me how to create test scenario ? A hello world will do? > >> > > I'm no

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-21 Thread Anirban Bhattacharya
I must say indeed a realistic method than just let a tool decide. loved it. On Feb 21, 2015 4:05 PM, "Tom Boutell" wrote: > On Feb 21, 2015 3:57 PM, "Anirban Bhattacharya" < > anirbanbhattacharya1...@gmail.com> wrote: > >> Seriously? A just select query is considered as so much db operation for >

Re: [nodejs] Why siege test showing PHP is performing better than Node

2015-02-25 Thread Aria Stewart
> On Feb 25, 2015, at 3:01 AM, Anirban Bhattacharya > wrote: > > Now when I am running Siege (a load test utility that simulate automatic > requests to websites) I get the below data > > When it is hitting node application > > HTTP/1.1 200 0.00 secs:3544 bytes ==> GET / > > And when