Amazon Keyspaces で VPC エンドポイントを設定しているVPCでグローバルエンドポイントとVPCエンドポイントを併用する方法。
方法
検証結果
- cassandra.ap-northeast-1.amazonaws.com にアクセスするとグローバルエンドポイントに接続される。
[ec2-user@ip-172-31-17-86 ~]$ cqlsh cassandra.ap-northeast-1.amazonaws.com 9142 --ssl Connected to Amazon Keyspaces at cassandra.ap-northeast-1.amazonaws.com:9142 [cqlsh 6.1.0 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> select * from system.peers; peer | data_center | host_id | preferred_ip | rack | release_version | rpc_address | schema_version | tokens ----------------+----------------+--------------------------------------+----------------+----------------+-----------------+----------------+--------------------------------------+-------------------------- 18.177.156.232 | ap-northeast-1 | 0984ca2e-8ee7-397b-88a0-7d8783efd305 | 18.177.156.232 | ap-northeast-1 | 3.11.2 | 18.177.156.232 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'-7173733806442603407'} 18.177.156.237 | ap-northeast-1 | 7afb0ca0-cfef-3ab4-a9d8-8919c468a586 | 18.177.156.237 | ap-northeast-1 | 3.11.2 | 18.177.156.237 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'-5124095576030431006'} 18.177.156.207 | ap-northeast-1 | 4aed79fb-8933-388a-8db1-df800c635b8c | 18.177.156.207 | ap-northeast-1 | 3.11.2 | 18.177.156.207 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'-3074457345618258605'} 18.177.156.213 | ap-northeast-1 | 01290fa4-e20f-3fb4-ace4-7406d48c52b3 | 18.177.156.213 | ap-northeast-1 | 3.11.2 | 18.177.156.213 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'-1024819115206086204'} 18.177.156.231 | ap-northeast-1 | 33d42b23-cc2c-3460-9646-b4bffedf646f | 18.177.156.231 | ap-northeast-1 | 3.11.2 | 18.177.156.231 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'1024819115206086197'} 18.177.156.253 | ap-northeast-1 | def25f13-8435-31b6-b250-c900fe4785aa | 18.177.156.253 | ap-northeast-1 | 3.11.2 | 18.177.156.253 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'3074457345618258598'} 18.177.156.214 | ap-northeast-1 | 49074ce2-2f74-36bd-8ed4-54568cc53079 | 18.177.156.214 | ap-northeast-1 | 3.11.2 | 18.177.156.214 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'5124095576030430999'} 18.177.156.212 | ap-northeast-1 | 7dacf8a2-b751-3494-9062-327c622e645c | 18.177.156.212 | ap-northeast-1 | 3.11.2 | 18.177.156.212 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'7173733806442603400'} 18.177.156.192 | ap-northeast-1 | 973a0ad2-4c73-360e-9928-732d864bced6 | 18.177.156.192 | ap-northeast-1 | 3.11.2 | 18.177.156.192 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'9223372036854775801'} (9 rows)
[ec2-user@ip-172-31-17-86 ~]$ cqlsh vpce-0f5f82f2f4d135942-2um9xrp5.cassandra.ap-northeast-1.vpce.amazonaws.com 9142 --ssl Connected to Amazon Keyspaces at vpce-0f5f82f2f4d135942-2um9xrp5.cassandra.ap-northeast-1.vpce.amazonaws.com:9142 [cqlsh 6.1.0 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> select * from system.peers; peer | data_center | host_id | preferred_ip | rack | release_version | rpc_address | schema_version | tokens ---------------+----------------+--------------------------------------+---------------+----------------+-----------------+---------------+--------------------------------------+-------------------------- 172.31.46.196 | ap-northeast-1 | 90ab788e-055a-3799-a5e6-1c682d38e7ab | 172.31.46.196 | ap-northeast-1 | 3.11.2 | 172.31.46.196 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'-3074457345618258603'} 172.31.30.103 | ap-northeast-1 | 76a77963-9462-30e7-89f2-dbb975ec5fbf | 172.31.30.103 | ap-northeast-1 | 3.11.2 | 172.31.30.103 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'3074457345618258602'} 172.31.3.159 | ap-northeast-1 | caaf4736-f9c8-3eb5-8c7d-aada28a89452 | 172.31.3.159 | ap-northeast-1 | 3.11.2 | 172.31.3.159 | 05deae2d-6405-494d-a965-c0e5836bcb3c | {'9223372036854775807'} (3 rows) cqlsh>