Skip to content

Target a specific edge server location

By default, responses to a request are served by an edge server geographically located closest to the user making the request. However for testing purposes or to debug issues related to caching behaviors it can be useful to target an edge server in a specific global location.

To target an edge server in a specific global location:

  1. Determine the edge server’s hostname. The hostname of each server location follows the pattern lb-cache<server-number>.<abbreviation>.vipv2.net.
    • <abbreviation> is populated by the three letter abbreviation of the server’s location city. Refer to the table on “Global locations of edge cache servers” for city abbreviations. For example, the three letter abbreviation of an edge server in Vienna, Austria is vie.
    • <server-number> is populated by an integer value between 1 and 8. Each edge server location has multiple servers, but not all integers between 1 and 8 are valid for that location. Use ping to test if a hostname is valid. In this example command, ping is used to confirm that 2 is a valid server number in the Vienna, Austria (vie) location:
$ ping -c1 lb-cache2.vie.vipv2.net
PING lb-cache2.vie.vipv2.net (185.138.29.29): 56 data bytes
64 bytes from 185.138.29.29: icmp_seq=0 ttl=46 time=191.748 ms

--- lb-cache2.vie.vipv2.net ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 191.748/191.748/191.748/nan ms
  1. Retrieve the edge server’s IP address. Use the hostname and the dig command to retrieve the server’s IP address. In this example command, the dig command is run for an edge server in Vienna, Austria (vie) with the determined hostname lb-cache2.vie.vipv2.net.

In this command example, the output indicates that the edge server with the hostname lb-cache2.vie.vipv2.net has the IP address 185.138.29.29:

$ dig +short lb-cache2.vie.vipv2.net
185.138.29.29
  1. Target the edge server with a request. Use the IP address retrieved in Step 2 to send a curl request for a URL of a site hosted on WPVIP to that specific server. Set up the command to output the value of the x-rq HTTP response header to confirm that the response came from the edge cache server location the command was intended to target. The curl should be structured as:
    curl -Is "<URL>" --resolve <domain>:443:<IP-address> | grep x-rq

In this command example, a curl request to the URL https://docs.wpvip.com/caching/ is made with the --resolve option to the edge server with the IP address 185.138.29.29:

$ curl -Is "https://docs.wpvip.com/caching/" --resolve docs.wpvip.com:443:185.138.29.29 | grep x-rq
x-rq: vie2 111 254 443

The response header and value x-rq: vie2 111 254 443 in the output confirms that the response was served by the edge server in Vienna, Austria (vie).

Last updated: November 26, 2024

Relevant to

  • Node.js
  • WordPress