How to create a robot to test the traffic on my site in localhost?

1

I have a mysite.com site that is running in a local LEMP environment (Linux, Nginx, MariaDB, PHP7). The site is now ready and I have a well loaded database with lots of fake data.

Before sending to AWS-EC2, I want to test some accessibility parameters.

So I wanted to know how to create a robot that will simulate several competing hits on my site.

I want to predict what the limit of users accessing the system in which it begins to lose the expected income.

Any ideas?

    
asked by anonymous 08.09.2016 / 01:39

1 answer

1

How about using ApacheBench ?

For example:

$ ab -n 100 -c 5 http://www.google.com/

-n : Indicates the number of HTTP requests.

-c : Indicates number of concurrent HTTP connections.

Output:

This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.google.com (be patient).....done


Server Software:        
Server Hostname:        www.google.com
Server Port:            80

Document Path:          /
Document Length:        260 bytes

Concurrency Level:      5
Time taken for tests:   1.217 seconds
Complete requests:      100
Failed requests:        87
   (Connect: 0, Receive: 0, Length: 87, Exceptions: 0)
Write errors:           0
Non-2xx responses:      100
Total transferred:      47848 bytes
HTML transferred:       26174 bytes
Requests per second:    82.18 [#/sec] (mean)
Time per request:       60.842 [ms] (mean)
Time per request:       12.168 [ms] (mean, across all concurrent requests)
Transfer rate:          38.40 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       24   28   2.9     28      39
Processing:    25   29   2.8     29      37
Waiting:       25   29   2.8     29      37
Total:         50   57   5.4     56      71

Percentage of the requests served within a certain time (ms)
  50%     56
  66%     59
  75%     61
  80%     62
  90%     65
  95%     67
  98%     71
  99%     71
 100%     71 (longest request)

I hope I have helped!

    
08.09.2016 / 02:34