added information on performance

main
Inga 🏳‍🌈 7 months ago
parent 3cba63cf8f
commit 302af9b5f9
  1. 67
      README.md

@ -78,6 +78,73 @@ TN12345682,GLS,"Street 5, 70173 Stuttgart, Germany","Street 15, 1050 Copenhagen,
## That is it - everything else is up to you! Happy coding!
# Solution
## Performance
> What would be required to scale this application to handle 1000 requests per second?
This application already handles over 3000 requests per second with ease, even with an artificial 20ms cache access latency.
Granted this is all for the same URL, and it can be slower if we will be requesting different URLs.
```
❯ ab -c 500 -n 100000 http://127.0.0.1:3000/packages/UPS/TN12345679
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 3000
Document Path: /packages/UPS/TN12345679
Document Length: 394 bytes
Concurrency Level: 500
Time taken for tests: 29.422 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 60300000 bytes
HTML transferred: 39400000 bytes
Requests per second: 3398.84 [#/sec] (mean)
Time per request: 147.109 [ms] (mean)
Time per request: 0.294 [ms] (mean, across all concurrent requests)
Transfer rate: 2001.47 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 7 3.5 7 19
Processing: 98 139 11.0 137 251
Waiting: 89 115 12.7 114 222
Total: 103 146 10.7 144 259
Percentage of the requests served within a certain time (ms)
50% 144
66% 146
75% 149
80% 151
90% 159
95% 166
98% 170
99% 172
100% 259 (longest request)
```
# Nest project readme
## Description

Loading…
Cancel
Save