How Do I Test If My Global Accelerator Works?
The test methods vary with different protocols.
Global Accelerator can respond to ICMP Ping and TCPing requests on behalf of endpoint servers but such Ping cannot be used to test the acceleration. For TCP, use curl for the test. For UDP, use hping3 for the test.
TCP
Run curl for testing.
- Deploy a web service on the endpoint server. The following uses Nginx as an example.
# Install Nginx. yum install nginx # Start the Nginx process. nginx
- Test the access latency before and after acceleration.
curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<domain-name or IP-address>[:<port>]"
- domain-name or IP-address: Before Global Accelerator is used, enter a domain-name that will be translated into the IP address of the endpoint server or enter the IP-address of the endpoint server. After Global Accelerator is used, enter a domain-name that will be translated into the anycast IP address or enter anycast IP address.
- port: HTTP port used by the application server.
- time_connect: the time in seconds, it took from the start until a TCP connection was established.
- time_starttransfer: the time in seconds, it took from the start until the first byte was just about to be transferred.
- time_total: the total time in seconds, that the full operation lasted.
- Compare the latency before and after the acceleration. The following uses the access from Johannesburg to Beijing as an example:
UDP
Run hping3 for testing.
- Deploy a UDP Echo service on the endpoint server. The following uses Socat as an example.
# Install Socat. yum install socat # Start Socat. nohup socat UDP-RECVFROM:<listening-port>,fork EXEC:'echo "Server response"' 2>/dev/null &
- Test the access latency before and after acceleration.
# Install hping3. yum install hping3 # Test the access latency. hping3 -2 -c <number-of-sent-packets> <IP> -p <port>;
- Compare the latency before and after the acceleration. The following uses the access from Riyadh to Beijing as an example:
- Access latency before acceleration
- Access latency after acceleration
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot