Because recently the company online node project Some unstable situation, consider in this respect can not do further optimization, since to do optimization first need to know where the problem?
Because the temporary cannot locate is the node layer problem or the API layer problem, because in the development environment Small concurrency program run is very stable, later consider using some pressure tools to verify the high concurrency in the time of the problem, here I prefer siege to do stress testing.
One: Installation
The system I use here is FreeBSD, please download the package yourself: http://download.joedog.org/siege/siege-latest.tar.gz
tar zxvf siege-latest. Tar . GZ CD Siege-3.0. 9 . /Configure make doInstall
It's ready to be installed soon.
Check the configuration file
/usr/local/siege/bin/siege-c
Current SIEGE CONFIGURATION
mozilla/5.0 (unknown-x86_64-freebsd10.0) siege/3.0.9
Edit the resource file to the settings.
----------------------------------------------
version:3.0.9
Verbose:true
Quiet:false
Debug:false
protocol:http/1.1
Get Method:head
Connection:close
Concurrent USERS:15
Time to RUN:N/A
repetitions:100
Socket TIMEOUT:30
Accept-encoding:gzip
Delay:1 sec
Internet Simulation:false
Benchmark Mode:false
Failures until abort:1024
Named Url:http://matouapp.ymatou.com/forymatouapp/home
URLs File:/etc/urls.txt
Logging:true
Log file:/var/siege.log
Resource file:/root/.siegerc
timestamped Output:false
Comma separated Output:false
Allow Redirects:true
Allow Zero byte data:true
Allow chunked encoding:true
Upload Unique Files:true
Second, use
parameter Description: transactions: Number of requests processed availability: Success rate Elapsed time: How long does it take to Data transferred: How many bytes are transferred time
: Response time Transaction rate: Average number of processing per second (indicates processing speed in the background) throughput: Average transmission speed per second Concurrency: Max concurrency successful TRANSACTI ONS: number of successful processes
Failed transactions: Number of failed processing
50 users (per concurrency, not concurrency per second) Duplicate 10 generates 50 *10= 500 requests (default: GET)
/usr/local/siege/bin/siege-c 50-r Http://matouapp.ymatou.com/forymatouapp/home
Execution Result:
Using siege for Web stress testing