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 |
ちゃんと、効果ありということが確認できました。
最後までお読みいただきましてありがとうございました!
「AWS認定資格試験テキスト&問題集 AWS認定ソリューションアーキテクト - プロフェッショナル 改訂第2版」という本を書きました。

「AWS認定資格試験テキスト AWS認定クラウドプラクティショナー 改訂第3版」という本を書きました。

「ポケットスタディ AWS認定 デベロッパーアソシエイト [DVA-C02対応] 」という本を書きました。

「要点整理から攻略するAWS認定ソリューションアーキテクト-アソシエイト」という本を書きました。

「AWSではじめるLinux入門ガイド」という本を書きました。


開発ベンダー5年、ユーザ企業システム部門通算9年、ITインストラクター5年目でプロトタイプビルダーもやりだしたSoftware Engineerです。
質問はコメントかSNSなどからお気軽にどうぞ。
出来る限りなるべく答えます。
このブログの内容/発言の一切は個人の見解であり、所属する組織とは関係ありません。
このブログは経験したことなどの共有を目的としており、手順や結果などを保証するものではありません。
ご参考にされる際は、読者様自身のご判断にてご対応をお願いいたします。
また、勉強会やイベントのレポートは自分が気になったことをメモしたり、聞いて思ったことを書いていますので、登壇者の意見や発表内容ではありません。
ad
ad
関連記事
-
-
macOSにAWS Schema Conversion Toolをインストール
環境 macOS BigSur バージョン11.5(20G71) MacBook …
-
-
AWS Certificate Manager証明書とAmazon Route 53でAmazon API GatewayのAPIのカスタムドメイン名前解決する
AWS Certificate ManagerとAmazon Route 53と …
-
-
Mountpoint for Amazon S3を試しました
このブログでは、画像などの配信にS3を使用しています。 WordPressのプラ …
-
-
AWS Secrets ManagerのローテーションでLambda関数の管理が必要なくなりました
Amazon RDS と AWS Secrets Manager の統合を発表と …
-
-
EC2のAMIとRDSのスナップショットを他のAWSアカウントに共有してブログサイトをAWSアカウント間で引っ越す
当ブログで使用しているEC2とRDSを環境の整理のため、他のAWSアカウントへ引 …
-
-
Windows EC2インスタンスでEBSとインスタンスストアを使用する
Amazon EBS基本のデモ(「AWS認定試験テキスト AWS認定 クラウドプ …
-
-
Amazon API GatewayのIAM認証の動作を確認しました
API GatewayのIAM認証は、IAMユーザーが実行できるように認証する、 …
-
-
AWS EC2 Amazon Linux にEC-CUBE3をnginx+MySql環境へインストール(手順検証中)
EC2インスタンスを作成する 少し古い記事で恐縮ですが試したい事があるのでAWS …
-
-
S3 過去のオブジェクトバージョンをコピーしてロールバックしました
バージョニングを有効にしているS3バケットで、オブジェクトを以前のバージョンに戻 …
-
-
boto3(Python SDK) s3 get_object でバイト範囲を指定する
S3のGetObjectアクションでバイト範囲を指定することができます。 それに …