If you specify TCP as the protocol when you add a listener to Global Accelerator (GA), you can run the cURL command to test the acceleration performance.
Prerequisites
Before you run the test, make sure that the following conditions are met:
A TCP listener is added. For more information, see Add and manage intelligent routing listeners.
The listener port is whitelisted by the security group rules of the endpoint server.
Background information
GA supports Layer 4 protocols such as TCP and UDP. You can run cURL commands to test the acceleration performance of a TCP listener. You cannot use ICMPing or TCPing for testing.
Procedure
Open the CLI on a client in the acceleration region.
Run the following command before and after you use GA to check the network latency between the client and the origin server:
curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<IP address or domain name of the origin server>[:<Port>]"
The following section describes the parameters:
time_connect: The period of time that is required to establish a TCP connection. Unit: seconds.
time_starttransfer: The start time of data transfer. The start time refers to the period of time from when the client sends a request to the backend server to when the first byte is sent to the client. Unit: seconds.
time_total: The total connection time. The total connection time refers to the period of time from when the client sends a request to when the client receives the last byte from the backend server. Unit: seconds.