LoginSignup
10
10

More than 5 years have passed since last update.

CloudFront が http2 に対応したので検証してみた

Last updated at Posted at 2016-09-09

CloudFront が http/2 に対応しました。

設定手順

 2016年9月8日(たぶん)より新規作成する場合は、デフォルトで http/2 が有効となるようになりました。既存のディストリビューションでは設定を変更し有効にすることが可能です。

[Distributions] → [General] → [Edit] から有効にすることが可能です。
スクリーンショット_2016-09-09_17_53_04.png

動作確認

jmeterを使い、常にアクセスし続けるようにしerrorが返って来ないことを確認しました。

CloudFront がdeploy 後に h2load コマンドで確認しました。
h2load に関しては下記の URL を参考にしました。
https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/

下記がコマンド実行結果です。

% h2load  https://xxxxxx.cloudfront.net/index.html                                       
starting benchmark...
spawning thread #0: 1 total client(s). 1 total requests
TLS Protocol: TLSv1.2
Cipher: ECDHE-RSA-AES128-GCM-SHA256
Server Temp Key: ECDH P-256 256 bits
Application protocol: h2
progress: 100% done

finished in 70.53ms, 14.18 req/s, 7.78KB/s
requests: 1 total, 1 started, 1 done, 1 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 1 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 562B (562) total, 278B (278) headers (space savings 22.78%), 208B (208) data
                     min         max         mean         sd        +/- sd
time for request:    16.54ms     16.54ms     16.54ms         0us   100.00%
time for connect:    52.84ms     52.84ms     52.84ms         0us   100.00%
time to 1st byte:    69.73ms     69.73ms     69.73ms         0us   100.00%
req/s           :      14.23       14.23       14.23        0.00   100.00%

Application protocol: h2 となっており、 http/2 でアクセス確認が取れました!!

まとめ

既存の CloudFront にサービス影響なく有効にできるのはいいなーと思いました。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10