負荷テストの実行

高負荷を発生させるため Siege を実行します

以下のコマンドで、ELBに対してアクセス負荷をかけます。

export WP_ELB=$(kubectl -n wordpress-cwi get svc understood-zebu-wordpress -o jsonpath="{.status.loadBalancer.ingress[].hostname}")

siege -q -t 30S -c 200 -i http://${WP_ELB}

30秒間で 200同時接続をシミュレートしています。

負荷テストが終わると、以下のようなOutputが出力されます


Lifting the server siege...      done.

Transactions:                    614 hits
Availability:                 100.00 %
Elapsed time:                  14.33 secs
Data transferred:               4.14 MB
Response time:                  3.38 secs
Transaction rate:              42.85 trans/sec
Throughput:                     0.29 MB/sec
Concurrency:                  144.79
Successful transactions:         614
Failed transactions:               0
Longest transaction:            5.55
Shortest transaction:           0.19
 
FILE: /home/ec2-user/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

次に、Container Insights でメトリクスを見てみましょう