Ever struggled getting to Akamai Staging?
Hereby I list out the test instructions for Akamai and how to test the configuration on the Akamai Staging environment. Please go through this carefully, it should explain it all. If there are any questions at all, please let me know and I can assist you further to test properly!
REQUIREMENTS FOR TESTING
- Administrator rights to change the HOSTS-file on the Operating System.
- Please make sure not to test through a VPN, it might override your local HOSTS-file.
- Able to perform dig/ping commands.
- Mac: Terminal or Windows: Command Prompt.
- Internet Browser.
- Google Chrome is recommended and these instructions will share details on all the necessary plugins.
WHAT IS AKAMAI STAGING?
Within Akamai, we have two environments, the Akamai Staging and Akamai Production environments. Outside of several minor differences, both act similar. The Akamai Staging network is a small set of EdgeServers and is used of testing configurations. Please understand the Akamai Staging environment is only for functional testing and not meant for performance testing.
STEP 1: GET AN AKAMAI EDGESERVER IP-ADDRESS
To be able to test a configuration on the Akamai Staging network, a tester is required to spoof his or her HOSTS file to send end-user request for a particular domain/hostname to an Akamai Staging EdgeServer.
Due to our ever-changing set of Staging EdgeServers and the way our platform works, I recommend requesting a “fresh" Staging IP-address for each test. It is important to use the Staging EdgeHostname. You can use your given EdgeHostname and just add –staging to the end. Please refer to the other email with your specific EdgeHostnames.
You can find out the Akamai IP-address by doing either a dig or ping command. See below:
www.akamai.com.edgesuite-staging.net. - 21600 - IN - CNAME - a1407.r.akamai–staging.net.
a1407.r.akamai-staging.net. - 20 – IN – A - 18.104.22.168
As you can see, the EdgeHostname is mapped on a DNS level to our Akamai DNS servers who will then dynamically map the end-user/tester to the nearest EdgeServer.
STEP 2: SPOOF BY MODIFYING THE HOSTS FILE
Now this IP-address needs to be added to the HOSTS-file of the Operating System. For Windows: C:\system32\drivers\etc\hosts and for MAC OS: etc/hosts.
Once you open this file in a text processor like Notepad, you can add the following line:
After saving the file, please do a ping-command to the website to verify that the correct Akamai IP-address is used.
STEP 3: PREPARE YOUR BROWSER FOR TESTING
I recommend using Google Chrome for testing. Google Chrome has Developer Tools built in that can return a lot of useful diagnostic information regarding testing including Akamai information. With a plug-in to Modify HTTP Headers, you will soon be ready for testing!
STEP 3A: INSTALLING MODIFY HEADERS FOR GOOGLE CHROME
In order to modify HTTP headers and add the Akamai Pragma headers for feed please install Modify Headers. You can find it here.
STEP3B: SET-UP MODIFY HEADERS WITH AKAMAI PRAGMA HEADERS
In order to set-up the Akamai Headers, please follow these steps.
- Go to your browser
- Click on the ‘head’ icon in the top right corner. This should open the Modify Headers plugin.
- Click on the ‘blue +’ sign in the top right corner to add the Akamai headers.
- Choose ‘Add’ in the Action column.
- Type in Pragma in the Name column.
- Copy the following in the Value column.
- akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-true-cache-key, akamai-x-get-client-ip
- (optional) Add a description in the Description column.
- Click on the ‘green floppy’ icon to save it.
- Make sure the ‘green ON’ symbol is active under the Actions column.
- Click on the ‘green Play’ button in the top left corner to start Modify Headers.
STEP 3C: OPEN A NEW TAB AND ENABLE DEVELOPER TOOLS
In order to start testing, open a new tab in Google Chrome. By right-clicking, you should see a list of option, select Inspect Element.
This should open the Developer Tools. There are a lot of options but please click on the Network tab. The Network tab will show you each object being retrieved from a HTTP request with the additional headers.
STEP 4: TIME TO START BROWSER/FUNCTIONAL TESTING
Now everything is in order to start testing configuration on the Akamai Staging network. By using the browser of choice, go to the domains you want to test. The Akamai Staging EdgeServer receives the request and based on the hostname will use the correct configuration that is deployed on the staging platform. Caching, Site Delivery and all other Akamai configured features will then be taken in effect and the end-user request is forwarded to the Origin Server as configured.
You can now test all the changes made to the configuration and verify if everything is working accordingly. Once approved, the configuration can be deployed to the Akamai Production platform.
STEP 4A: HOW TO VERIFY YOU ARE TESTING ON AKAMAI STAGING?
In the Developer Tools, Network tab, please click on the top-object. Usually this is the website you are trying to contact. By looking in the Header information, a header X-Akamai-Staging should be present. If this header is present, you are correctly testing through the Akamai Staging platform.
More Akamai headers should be returned that shows input on the features enabled and if objects are correctly being cached. If you have any questions about this, please feel free to let me know!
STEP 5: TEST RESULTS
If there are any issues found, please send me the URL or how to navigate to that page and also the browser you tested it with. I will test this as well.
Please go through the website carefully, if all goes well, there should be no issues. This includes any special requirements like geo-routing, mobile routing etc. But also correct caching of items.