Friday 21 April 2017

Need to achieve 5000 concurrent api hits on AWS using Node.js

We are currently trying to achieve 5000 TPS hit for one of our API. We are using Mongo Atlas 3.2.12 and NodeJS v6.10.2, on every hit it hits DB with 3 find queries. There is an ELB in place and behind the ELB there are two instances of Amazon EC2 type medium. Using Apache Benchmark tool we figured out that in a second it is only handling the 68 hits.

Below is the Apache Benchmark tool's output -

Document Length:        748 bytes

Concurrency Level:      1000
Time taken for tests:   116.294 seconds
Complete requests:      5000
Failed requests:        4274
   (Connect: 0, Receive: 0, Length: 4274, Exceptions: 0)
Write errors:           0
Total transferred:      5440980 bytes
HTML transferred:       3830980 bytes
Requests per second:    42.99 [#/sec] (mean)
Time per request:       23258.823 [ms] (mean)
Time per request:       23.259 [ms] (mean, across all concurrent requests)
Transfer rate:          45.69 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        6  418 823.7     10    2448
Processing:   197 21032 7150.3  21848   35739
Waiting:      197 21031 7150.3  21848   35739
Total:        205 21450 7264.9  22052   36744

Percentage of the requests served within a certain time (ms)
  50%  22052
  66%  24953
  75%  26697
  80%  27814
  90%  30272
  95%  31804
  98%  33428
  99%  34534
 100%  36744 (longest request)

Please suggest the changes and architecture.



via Vikalp

No comments:

Post a Comment