driftx commented on code in PR #2859: URL: https://github.com/apache/cassandra/pull/2859#discussion_r1381522669
########## doc/modules/cassandra/pages/managing/operating/snitch.adoc: ########## @@ -66,9 +103,36 @@ Ec2MultiRegionSnitch:: well). You will need to open the `storage_port` or `ssl_storage_port` on the public IP firewall (For intra-Region traffic, Cassandra will switch to the private IP after establishing a connection). -RackInferringSnitch:: - Proximity is determined by rack and data center, which are assumed to - correspond to the 3rd and 2nd octet of each node's IP address, - respectively. Unless this happens to match your deployment - conventions, this is best used as an example of writing a custom - Snitch class and is provided in that spirit. + +For Ec2 snitches, since https://issues.apache.org/jira/browse/CASSANDRA-16555[CASSANDRA-16555], it is possible to +choose version of AWS IMDS. By default, IMDSv2 is used. The version of IMDS is driven by property `ec2_metadata_type` +and can be of value either `v1` or `v2`. It is possible to specify custom URL of IMDS by +`ec2_metadata_url` (or by `metadata_url`) which is by default `http://169.254.169.254` and then a query against +`/latest/meta-data/placement/availability-zone` endpoint is executed. + +IMDSv2 is secured by a token which needs to be fetched from IDMSv2 first, and it has to be passed in a header +for the actual queries to IDMSv2. `Ec2Snitch` and `Ec2MultiRegionSnitch` are doing this automatically. +The only configuration parameter exposed to a user is `ec2_metadata_token_ttl_seconds` +which is by default set to `21600`. TTL has to be an integer from the range `[30, 21600]`. + +AlibabaCloudSnitch:: + A snitch that assumes an ECS region is a DC and an ECS availability_zone + is a rack. This information is available in the config for the node. the + format of the zone-id is like 'cn-hangzhou-a' where cn means china, hangzhou Review Comment: Seems like the literals here (like 'a') should be quoted for clarity. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

