2 minute read Platform Engineering

When working with Akamai for content delivery, caching, and performance optimisation, it’s crucial to test changes safely before deploying to production. Akamai provides a staging network specifically for this purpose; identical to the production environment but isolated so changes can be validated without risk.

What Is the Akamai Staging Network?

The staging network simulates Akamai’s production edge environment. It uses the same configuration and features, including EdgeWorkers, rules in Property Manager, caching behavior, and more, but the requests are served from staging-specific Akamai edge servers.

This lets you:

  • Test new rules in Property Manager
  • Validate EdgeWorkers behavior
  • Confirm origin changes
  • Ensure caching and purging works as expected

When you have tested your configuration using Akamai’s staging network, you can have a high level of confidence that it will also work on the production network.

When Should You Use It?

Use the staging network when:

  • You’ve made a configuration change in Property Manager.
  • You’ve updated your EdgeWorker code.
  • You’re deploying new content that depends on Akamai edge logic.
  • You’re debugging issues before pushing to production.

How to Test on the Akamai Staging Network

Your entry point into the Akamai edge network is an “edge hostnme”. Edge hostnames provide the DNS-based mechanism that maps each user request from the originally requested property hostname (your domain) to the optimal Akamai edge server. While assigning hostnames to a property, you specify an edge hostname for each. That, coupled with mapping the property hostname to the edge hostname in your DNS record, redirects the traffic to your site, to the Akamai servers.

  1. Get the IP address for the edge hostname on the staging network.

When you create an edge hostname it will have a hostname ending in edgekey.net (for Enhanced TLS, Standard TLS edge hostname have a edgesuite.net hostname, but we won’t go into that in this post). This hostname targets the Akamai production network. Akamai also creates an alternative hostname for the production network, where the hostname suffix changes to edgekey-staging.net.

For example:

  • Staging network: example.com.edgekey-staging.net
  • Production network: example.com.edgekey.net

You can retrieve the IP address for the staging network using dig or nslookup.

dig example.com.edgekey-staging.net

This will return one or more IP addresses. For example:

$ dig example.com.edgekey-staging.net

; <<>> DiG 9.10.6 <<>> example.com.edgekey-staging.net
;; ANSWER SECTION:
;; ANSWER SECTION:
example.com.edgekey-staging.net. 508 IN	CNAME	e10648.x.akamaiedge.net.
e10648.x.akamaiedge.net. 20	IN	A	23.45.67.89

The A record’s value is the IP address of the staging network.

  1. Override DNS resolution for your property hostname.

Edit /etc/hosts (Linux/macOS) or C:\Windows\System32\drivers\etc\hosts (Windows) so that requests from your machine to the hostname are directed to Akamai’s staging network:

23.45.67.89 www.yoursite.com

Now you can use your actual domain (e.g. www.yoursite.com) and hit the staging network.

How can I confirm I’m receiving responses from the Akamai Staging Network?

The presence of the X-Akamai-Staging response header confirms that your request hit the Staging network.

If you are not seeing the header in the response, you can flush your DNS cache again with the dscacheutil -flushcache; sudo killall -HUP mDNSResponder command (if you’r running macOS).

What next?

Test your site just as you would if you were testing on the origin server. Check your site’s key functionality, such as logging in, using the shopping cart, and so on. Once you’re satisfied that your site works, remove the new entry from your hosts file and save it.

If the testing is successful, you can activate the new configuration on the ​Akamai​ production network.

Leave a comment