EC2 プレイスメントグループを試してみました
2020/08/12
やったことないのでやってみたやつです。
目次
プレイスメントグループの作成
まず、EC2のコンソールでプレイスメントグループをクラスターとスプレッドと2種類作成しました。
クラスタープレイスメントグループでEC2インスタンスを起動
クラスタープレイスメントグループではインスタンスファミリーが限定されました。
以下でした。
- 汎用: A1、M4、M5、M5a、M5ad、M5d、M5dn、M5n
- コンピューティングの最適化: C3、C4、C5、C5d、C5n、cc2.8xlarge
- メモリ最適化: cr1.8xlarge、R3、R4、R5、R5a、R5ad、R5d、R5dn、R5n、 X1、X1e、z1d
- ストレージの最適化: D2、H1、hs1.8xlarge、I2、I3、I3en
- 高速コンピューティング: F1、G2、G3、G4dn、P2、P3、P3dn
m4.largeで2インスタンス作成しました。
一方のインスタンスからもう一方のインスタンスのプライベートIPアドレス宛にpingを実行してみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ ping 172.31.52.224 PING 172.31.52.224 (172.31.52.224) 56(84) bytes of data. 64 bytes from 172.31.52.224: icmp_seq=1 ttl=255 time=0.211 ms 64 bytes from 172.31.52.224: icmp_seq=2 ttl=255 time=0.140 ms 64 bytes from 172.31.52.224: icmp_seq=3 ttl=255 time=0.142 ms 64 bytes from 172.31.52.224: icmp_seq=4 ttl=255 time=0.143 ms 64 bytes from 172.31.52.224: icmp_seq=5 ttl=255 time=0.142 ms 64 bytes from 172.31.52.224: icmp_seq=6 ttl=255 time=0.138 ms 64 bytes from 172.31.52.224: icmp_seq=7 ttl=255 time=0.145 ms 64 bytes from 172.31.52.224: icmp_seq=8 ttl=255 time=0.143 ms 64 bytes from 172.31.52.224: icmp_seq=9 ttl=255 time=0.148 ms 64 bytes from 172.31.52.224: icmp_seq=10 ttl=255 time=0.141 ms 64 bytes from 172.31.52.224: icmp_seq=11 ttl=255 time=0.145 ms |
スプレッドプレイスメントグループでEC2インスタンスを起動
スプレッドプレイスメントグループは、t3a.nanoでもいいようです。
でも一応同じインスタンスタイプのm4.largeにしてみました。
同じ要領で確認しました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
ping 172.31.56.120 PING 172.31.56.120 (172.31.56.120) 56(84) bytes of data. 64 bytes from 172.31.56.120: icmp_seq=1 ttl=255 time=0.200 ms 64 bytes from 172.31.56.120: icmp_seq=2 ttl=255 time=0.128 ms 64 bytes from 172.31.56.120: icmp_seq=3 ttl=255 time=0.137 ms 64 bytes from 172.31.56.120: icmp_seq=4 ttl=255 time=0.138 ms 64 bytes from 172.31.56.120: icmp_seq=5 ttl=255 time=0.127 ms 64 bytes from 172.31.56.120: icmp_seq=6 ttl=255 time=0.117 ms 64 bytes from 172.31.56.120: icmp_seq=7 ttl=255 time=0.140 ms 64 bytes from 172.31.56.120: icmp_seq=8 ttl=255 time=0.125 ms 64 bytes from 172.31.56.120: icmp_seq=9 ttl=255 time=0.138 ms 64 bytes from 172.31.56.120: icmp_seq=10 ttl=255 time=0.127 ms 64 bytes from 172.31.56.120: icmp_seq=11 ttl=255 time=0.137 ms |
プレイスメントグループ外からの確認
プレイスメントグループではない別インスタンスへも確認します。
クラスター→スプレッド
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ ping 172.31.61.226 PING 172.31.61.226 (172.31.61.226) 56(84) bytes of data. 64 bytes from 172.31.61.226: icmp_seq=1 ttl=255 time=0.265 ms 64 bytes from 172.31.61.226: icmp_seq=2 ttl=255 time=0.208 ms 64 bytes from 172.31.61.226: icmp_seq=3 ttl=255 time=0.199 ms 64 bytes from 172.31.61.226: icmp_seq=4 ttl=255 time=0.218 ms 64 bytes from 172.31.61.226: icmp_seq=5 ttl=255 time=0.207 ms 64 bytes from 172.31.61.226: icmp_seq=6 ttl=255 time=0.214 ms 64 bytes from 172.31.61.226: icmp_seq=7 ttl=255 time=0.217 ms 64 bytes from 172.31.61.226: icmp_seq=8 ttl=255 time=0.209 ms 64 bytes from 172.31.61.226: icmp_seq=9 ttl=255 time=0.218 ms 64 bytes from 172.31.61.226: icmp_seq=10 ttl=255 time=0.210 ms |
スプレッド→クラスター
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ ping 172.31.48.179 PING 172.31.48.179 (172.31.48.179) 56(84) bytes of data. 64 bytes from 172.31.48.179: icmp_seq=1 ttl=255 time=0.290 ms 64 bytes from 172.31.48.179: icmp_seq=2 ttl=255 time=0.215 ms 64 bytes from 172.31.48.179: icmp_seq=3 ttl=255 time=0.228 ms 64 bytes from 172.31.48.179: icmp_seq=4 ttl=255 time=0.229 ms 64 bytes from 172.31.48.179: icmp_seq=5 ttl=255 time=0.211 ms 64 bytes from 172.31.48.179: icmp_seq=6 ttl=255 time=0.205 ms 64 bytes from 172.31.48.179: icmp_seq=7 ttl=255 time=0.216 ms 64 bytes from 172.31.48.179: icmp_seq=8 ttl=255 time=0.210 ms 64 bytes from 172.31.48.179: icmp_seq=9 ttl=255 time=0.213 ms 64 bytes from 172.31.48.179: icmp_seq=10 ttl=255 time=0.280 ms |
せっかくなので、別AZに作ったインスタンスからも
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ ping 172.31.61.226 PING 172.31.61.226 (172.31.61.226) 56(84) bytes of data. 64 bytes from 172.31.61.226: icmp_seq=1 ttl=255 time=0.364 ms 64 bytes from 172.31.61.226: icmp_seq=2 ttl=255 time=0.385 ms 64 bytes from 172.31.61.226: icmp_seq=3 ttl=255 time=0.355 ms 64 bytes from 172.31.61.226: icmp_seq=4 ttl=255 time=0.383 ms 64 bytes from 172.31.61.226: icmp_seq=5 ttl=255 time=0.398 ms 64 bytes from 172.31.61.226: icmp_seq=6 ttl=255 time=0.386 ms 64 bytes from 172.31.61.226: icmp_seq=7 ttl=255 time=0.391 ms 64 bytes from 172.31.61.226: icmp_seq=8 ttl=255 time=0.379 ms 64 bytes from 172.31.61.226: icmp_seq=9 ttl=255 time=0.367 ms 64 bytes from 172.31.61.226: icmp_seq=10 ttl=255 time=0.394 ms |
ちゃんと、効果ありということが確認できました。
最後までお読みいただきましてありがとうございました!
【PR】 「AWS認定試験対策 AWS クラウドプラクティショナー」という本を書きました。
【PR】 「AWSではじめるLinux入門ガイド」という本を書きました。
【PR】 「ポケットスタディ AWS認定 デベロッパーアソシエイト」という本を書きました。
【PR】 「AWS認定資格試験テキスト&問題集 AWS認定ソリューションアーキテクト - プロフェッショナル」という本を書きました。

開発ベンダー5年、ユーザ企業システム部門通算9年、ITインストラクター5年目でプロトタイプビルダーもやりだしたSoftware Engineerです。
質問はコメントかSNSなどからお気軽にどうぞ。
出来る限りなるべく答えます。
このブログの内容/発言の一切は個人の見解であり、所属する組織とは関係ありません。
このブログは経験したことなどの共有を目的としており、手順や結果などを保証するものではありません。
ご参考にされる際は、読者様自身のご判断にてご対応をお願いいたします。
また、勉強会やイベントのレポートは自分が気になったことをメモしたり、聞いて思ったことを書いていますので、登壇者の意見や発表内容ではありません。
ad
ad
関連記事
-
-
EC2 Amazon Linux 2 にAmazon LinuxからWordPressを移行
このブログを新しいインスタンスに移行することにしました。 2015年5月にAma …
-
-
Amazon Glacierのプロビジョニングされた迅速取り出し容量をなぜか購入しました
過去1年ぐらいのAWSコストをCost Explorerで見てまして、10/10 …
-
-
[JapanTaxi] Athena 指向アナリティクス 〜真面目に手を抜き価値を得よ〜(AWS Summit Tokyo 2017)を聞いてきました
Athenaのユースケースとして聞きにいきましたが、最近触ってるRe:dashも …
-
-
Amazon Chimeのチャットを使ってみました
Amazon Chimeはビデオミーティングや配信したりというサービスですが、チ …
-
-
AWS Data Pipelineを使ってDynamoDBのアイテムを全件S3バケットに書き出した
ちょっと試してみたくてやってみました。 手順はこちらのチュートリアルを参考にすす …
-
-
Microsoft TeamsのIncoming Webhooksを使ってAWS Lambda(Python)からFeedlyの記事を自動投稿する
Microsoft Teamsの検証を始めましたので、Slackで自動化している …
-
-
特定AWSアカウント特定リージョンのSNSトピックを削除するLambda(Python)
やりたいこと 特定アカウント内特定リージョン内のSNSトピックを全部削除したいで …
-
-
JAWS FESTA 2017 Reverse X re:Birth
JAWS FESTA 2017 中四国 今年はブログタイトル「JAWS FEST …
-
-
AWS Cloud9で環境を共有する
(特にリモート環境では)画面共有をしたり、リポジトリを共有したり、コーディング環 …
-
-
AWS DeepLensセットアップの儀
AWS DeepLensのセットアップを開始します。 AWS DeepLensを …