```bash #!/usr/bin/env bash # Latency check: getent + curl (TCP/TLS/HTTP timing) to AWS and GCP Europe. # Run from any region (e.g. EC2 Tokyo); change targets or run from different regions to compare. # No ping — getent and curl only. targets=( ec2.eu-central-1.amazonaws.com s3.eu-central-1.amazonaws.com s3.eu-west-1.amazonaws.com s3.eu-west-3.amazonaws.com storage.europe-west1.rep.googleapis.com logging.europe-west3.rep.googleapis.com europe-west1-aiplatform.googleapis.com ) for h in "${targets[@]}"; do echo "===== $h =====" getent ahosts "$h" | head -n 3 echo "-- tcp/tls/http timing --" curl -4 -s -o /dev/null \ -w "dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} starttransfer=%{time_starttransfer} total=%{time_total}\n" \ "https://$h" || echo "HTTPS test failed" echo done ```