What is a conntrace and how can it help with troubleshooting?
A conntrace, short for connection trace, provides details on a number of things related to the connection between the client and the web server.
This information can be used to help with debugging and troubleshooting by confirming the incoming IP address, the target CDN node, and the target data centre, among other things.
For example, if a client from the US is hitting a CDN node outside of America, this may indicate a routing issue within the network path being used by the client's ISP.
How do I perform a conntrace?
A conntrace can be performed on any website hosted with 20i by navigating to the "/.connntrace" URL, as an example: https://www.20i.com/.conntrace or https://www.yourdomain.com/.conntrace
As a further example, if your domain was mysite.com then the conntrace URL would be https://mysite.com/.conntrace
Let’s take a look at an example conntrace from the 20i homepage, and go over what each header means.
{
"HTTP_ACCEPT_ENCODING": "gzip",
"HTTP_ACCEPT_LANGUAGE": "en-GB,en-US;q=0.9,en;q=0.8",
"HTTP_HOST": "www.20i.com",
"HTTP_STACKCDN_CONNECTING_IP": "11.22.33.44",
"HTTP_USER_AGENT": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/118.0.0.0 Safari\/537.36",
"HTTP_X_ASN": "12345",
"HTTP_X_COUNTRY": "GB",
"HTTP_X_TARGET_DC": "LHR",
"HTTP_X_VIA": "LHR1"
}
HTTP_ACCEPT_ENCODING
This header specifies the encoding methods supported by the client. In this case, it indicates that the client supports the "gzip" encoding, which is often used for data compression.
HTTP_ACCEPT_LANGUAGE
This header indicates the preferred languages of the client, listed in order of preference. In this example, the client prefers "en-GB" (British English) and "en-US" (American English) with varying degrees of preference.
HTTP_HOST
This header specifies the host (domain) that the client is requesting resources from. In this case, it's "www.20i.com."
HTTP_STACKCDN_CONNECTING_IP
This header indicates the IP address from which the client is connecting to the StackCDN server. The IP address in this case is "11.22.33.44".
HTTP_USER_AGENT
This header provides information about the user agent (web browser or application) used by the client. It includes details about the operating system (Windows 10), the browser (Chrome), and the browser's version.
HTTP_X_ASN
This header contains the Autonomous System Number (ASN) of the connecting IP address. An ASN is often used to identify the network or organization responsible for a specific IP address. In this case the ASN is "12345".
HTTP_X_COUNTRY
This header indicates the country associated with the client's IP address. In this case it's "GB", representing the United Kingdom.
HTTP_X_TARGET_DC
This header indicates the target origin data centre for the request. This will be "LHR" for packages within our UK data centre, and "DFW" for packages within our US data centre.
HTTP_X_VIA
This header represents the StackCDN node that handled the incoming request. In this case it's "LHR1", indicating the request was received by one of our CDN servers in London before being passed on to the origin server.