Akamai Integration Process for www.test.com
Step 1: Create a configuration on the Akamai Luna Control Center as per the Portal walkthrough conducted.
Pre-requisites: (These are pre-requisites to create a basic configuration, complex requirements will need more rules.)
- - end user facing hostname – For example, www.test.com
- - origin server hostname – this will point to the origin server from where Akamai will fetch the content.
- - Edge hostname – in case of a new hostname integration, this must be created separately using the “Create New Edge Hostname” Option. In case of secure hostnames, please reach out to your account team as this will need PS involvement.
- - Configure TTL Rules and other behaviors as per your requirements.
More Details for your reference: https://control.akamai.com/portal/content/akaServiceSupport/documentation/PropertyManagerDocumentation.jsp
Step 2: Save and Activate the configuration on the Akamai Staging Network.
Step 3: Test the configuration on the Akamai Staging Network by spoofing. Instructions below.
- Open command prompt and run the following command. (nslookup on the staging hostname —> Copy the “Edge Hostname” from the configuration and add a “-staging” after edgesuite/edgekey in order to get the staging hostname)
Make a note of the IP address returned from the above command.
2. Edit your local hosts file (located at: C:\WINDOWS\system32\drivers\etc\hosts). In order to get the access rights to save the hosts file, Right Click on the hosts file —> Properties —> Security —> Select the appropriate role —> Assign rights —> Click on “Apply”.
3. Make the following entry:
<IP address from step 1> <hostname>
4. Save the hosts file.
5. Restart your browsers and test the site.
To ensure the requests are going through the Akamai Staging Network,
a) Install the Modify Headers and Firebug add ons in Mozilla Firefox.
b) Open the Add-on and select the action "Add".
c) Enter the header "Pragma" in the "Header Name" textbox.
d) Enter the value
In the "Header Value" textbox.
e) Click on "Add" and Enable the header newly added. These Pragma headers ensure that the Akamai Edge server sends the Cache related headers for verification purposes. The important headers to look out for are:
f) Install the add on Firebug. Go to Firefox —> Tools —> Web Developer —> Firebug —> Activate Firebug. This can also be done by clicking on the “Bug Icon” that usually appears on the Tool bar once Firebug is instaslled.
Headers which can be useful in indicating important information.
X-Akamai-Staging: Edgesuite/ESSL --> indicates the request is going through the staging network.
X-Check-Cacheable=YES/NO -> indicates if the content being requested for is cacheable or not.
X-Cache-Key will include TCP Miss, TCP hit, and TTL value of the object being requested.
X-Cache header's values and their interpretations are listed below.
TCP_HIT: Object was fresh in cache and object from disk cache.
TCP_MISS: Object was not in cache, server fetched object from origin.
TCP_REFRESH_HIT: Object was stale in cache and we successfully refreshed with the origin on an If-Modified-Since request.
TCP_REFRESH_MISS: Object was stale in cache and refresh obtained a new object from origin in response to our IF-Modified-Since request.
TCP_REFRESH_FAIL_HIT: Object was stale in cache and we failed on refresh (couldn't reach origin) so we served the stale object.
TCP_IMS_HIT: IF-Modified-Since request from client and object was fresh in cache and served.
TCP_NEGATIVE_HIT: Object previously returned a "not found" (or any other negatively cacheable response) and that cached response was a hit for this new request.
TCP_MEM_HIT: Object was on disk and in the memory cache. Server served it without hitting the disk.
Step 4: After making sure the site is working fine on the Akamai Staging Network (PLEASE ENSURE ALL THE FUNCTIONALITIES OF THE SITE IS TESTED ON THE STAGING NETWORK AND ARE VERIFIED TO BE WORKING AS EXPECTED) activate the configuration on the Akamai Production Network.
Step 5: Follow the below go-live instructions.
1. Please make sure you remove the entries made in your hosts file after you complete testing.
2. For the requests made to your websites to land on Akamai Network, you need to perform a CNAME change to an Akamai host name during go-live.
IMPORTANT: PLEASE ENSURE THAT THE TTL OF THE ABOVE RECORDS IS REDUCED TO 300 SECONDS AND IS PROPAGATED THROUGH OUT THE INTERNET BEFORE PROCEEDING WITH THE CNAME CHANGES.
After the CNAME change is done, the CNAME records will look like below (TTL = 295, the low TTL will ensure smooth propagation of the CNAME through out the internet and will also help in rollback if any issues arise.)
www.test.com. 295 IN CNAME www.test.com.edgesuite.net.
3. Once the above is complete, perform verification tests to ensure DNS record is updated properly and site loads fine.
Once a stable behavior is confirmed, you can increase this TTL value.
Once the above is complete and once the traffic is served over Akamai, please test again to ensure that the site is working perfectly fine.
ROLLBACK Procedure (in case the site is not working as expected as soon as the go-live is done):
1. If you do feel there are any issues with the site after the above CNAME change is done, please change the CNAME records back to what it was before.
2. Please keep the TTL as low as possible so that the rollback can happen smoothly across the network. This TTL can be increased later.
Step 6: Once the go-live is successfully complete, if any more new requirements come up and require changes in the Akamai Configuration (for example, TTL Change for an object) then follow the below steps.
- - Create a new version from the current Production Configuration, and make the required changes as per the requirement.
- - Save the configuration and activate the version on Staging Network.
- - Spoof to a Staging IP (Steps covered in detail earlier) and ensure the change is working fine without affecting other functionalities of the site.
- - Only after you have confirmed that the Staging setup is working fine, proceed with activating the same on the Production Network which will make the changes live.