테스트 결과

Load Test

execution: local
     script: load.js
     output: statsd (localhost:8125)

  scenarios: (100.00%) 1 scenario, 300 max VUs, 10m30s max duration (incl. graceful stop):
           * default: Up to 300 looping VUs for 10m0s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

running (10m04.0s), 000/300 VUs, 33581 complete and 0 interrupted iterations
default ✓ [======================================] 000/300 VUs  10m0s

     █ setup

     data_received..................: 1.8 GB 3.1 MB/s
     data_sent......................: 62 MB  102 kB/s
     http_req_blocked...............: avg=40.24µs min=1.81µs  med=5.21µs  max=979.71ms p(90)=6.46µs  p(95)=7.26µs
     http_req_connecting............: avg=10.43µs min=0s      med=0s      max=38.86ms  p(90)=0s      p(95)=0s
     http_req_duration..............: avg=9.12ms  min=2.51ms  med=5.45ms  max=609.19ms p(90)=16.15ms p(95)=21.11ms
       { expected_response:true }...: avg=9.12ms  min=2.51ms  med=5.45ms  max=609.19ms p(90)=16.15ms p(95)=21.11ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 134325
     http_req_receiving.............: avg=1.68ms  min=26.43µs med=78.3µs  max=462.13ms p(90)=5.45ms  p(95)=7.06ms
     http_req_sending...............: avg=24.51µs min=8.84µs  med=23.74µs max=597.75µs p(90)=29.2µs  p(95)=32.5µs
     http_req_tls_handshaking.......: avg=17.1µs  min=0s      med=0s      max=31.99ms  p(90)=0s      p(95)=0s
     http_req_waiting...............: avg=7.41ms  min=2.43ms  med=5.35ms  max=512.02ms p(90)=10.96ms p(95)=15.24ms
     http_reqs......................: 134325 222.37573/s
     iteration_duration.............: avg=4.04s   min=1.07s   med=4.03s   max=4.71s    p(90)=4.05s   p(95)=4.06s
     iterations.....................: 33581  55.593519/s
     vus............................: 1      min=0       max=300
     vus_max........................: 300    min=300     max=300

Untitled

테스트 3과 비교하여, avg duration은 25ms → 9ms, p(90) duration은 47ms → 16ms 로 줄었다.

Stress Test

running (13m04.3s), 0000/1200 VUs, 106696 complete and 1 interrupted iterations
default ✓ [======================================] 0000/1200 VUs  13m0s

     █ setup

     data_received..................: 5.9 GB 7.5 MB/s
     data_sent......................: 196 MB 249 kB/s
     http_req_blocked...............: avg=594.95µs min=1.78µs   med=5.21µs  max=6.57s  p(90)=6.3µs    p(95)=6.91µs
     http_req_connecting............: avg=297.88µs min=0s       med=0s      max=3.08s  p(90)=0s       p(95)=0s
     http_req_duration..............: avg=270.48ms min=2.72ms   med=36.67ms max=1m0s   p(90)=696.13ms p(95)=1.4s
       { expected_response:true }...: avg=269.08ms min=2.72ms   med=36.67ms max=39.69s p(90)=695.9ms  p(95)=1.4s
     http_req_failed................: 0.00%  ✓ 10         ✗ 426745
     http_req_receiving.............: avg=121.96ms min=0s       med=81.29µs max=59.88s p(90)=227.15ms p(95)=680.03ms
     http_req_sending...............: avg=23.65µs  min=7.93µs   med=23.64µs max=3.4ms  p(90)=29.05µs  p(95)=31.22µs
     http_req_tls_handshaking.......: avg=288.36µs min=0s       med=0s      max=6.53s  p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=148.5ms  min=2.63ms   med=36.39ms max=1m0s   p(90)=322.4ms  p(95)=646.56ms
     http_reqs......................: 426755 544.118236/s
     iteration_duration.............: avg=5.08s    min=498.84ms med=4.48s   max=1m0s   p(90)=6.76s    p(95)=7.94s
     iterations.....................: 106696 136.038803/s
     vus............................: 2      min=2        max=1200
     vus_max........................: 1200   min=1200     max=1200

Untitled

avg duration은 625ms에서 270ms로, p(90) duration은 1.59s 에서 696ms 로 줄었다.

하지만 VU 600 이후 900까지 상승하는 구간에서, 정확히는 VU 670부터 스루풋 한계가 오기 시작했다.

Spike Test

running (6m44.9s), 0000/4200 VUs, 45665 complete and 44 interrupted iterations
default ✓ [======================================] 0000/4200 VUs  6m40s

     █ setup

     data_received..................: 2.4 GB 6.0 MB/s
     data_sent......................: 82 MB  201 kB/s
     http_req_blocked...............: avg=148.51ms min=0s     med=5.42µs  max=58.47s p(90)=7.05µs p(95)=12.78µs
     http_req_connecting............: avg=59.24ms  min=0s     med=0s      max=23.67s p(90)=0s     p(95)=0s
     http_req_duration..............: avg=2.56s    min=0s     med=36.68ms max=1m0s   p(90)=4.65s  p(95)=12.57s
       { expected_response:true }...: avg=1.49s    min=2.62ms med=36.4ms  max=59.98s p(90)=3.63s  p(95)=8.65s
     http_req_failed................: 2.11%  ✓ 3655       ✗ 168793
     http_req_receiving.............: avg=1.16s    min=0s     med=83.49µs max=59.92s p(90)=1.28s  p(95)=4.36s
     http_req_sending...............: avg=290.1µs  min=0s     med=24.53µs max=41.55s p(90)=31.4µs p(95)=37.53µs
     http_req_tls_handshaking.......: avg=92.28ms  min=0s     med=0s      max=58.43s p(90)=0s     p(95)=0s
     http_req_waiting...............: avg=1.39s    min=0s     med=36.52ms max=1m0s   p(90)=1.5s   p(95)=4.57s
     http_reqs......................: 172448 425.934077/s
     iteration_duration.............: avg=14.41s   min=1.14s  med=6.92s   max=2m15s  p(90)=44.06s p(95)=1m0s
     iterations.....................: 45665  112.789244/s
     vus............................: 4      min=0        max=4200
     vus_max........................: 4200   min=4200     max=4200

Untitled

마찬가지로 스루풋 한계가 오기 시작했다.

duration 그래프가 60s에 끊기는 것을 볼 수 있는데, nginx 기본 fail timeout 시간이 60s 이기 때문이다.