awslabs / aws-support-tools

Tools and sample code provided by AWS Premium Support.
https://aws.amazon.com/premiumsupport/
Apache License 2.0
1.45k stars 798 forks source link

Improve `curl_for_latency.sh` by re-using a TCP connection between requests, removing the noise and delay of the initial connection to better simulate a real-life use case. #227

Open neilferreira opened 10 months ago

neilferreira commented 10 months ago

Case number: 13875838791

Description of changes:

In a "real life" example where a client would interact with an edge-optimised API, steps 1-3 of this guide is likely to be cached.

By re-using the TCP connection in this script it better pinpoints the increased latency within the connection between CloudFront and API Gateway.