Different Client and Content Characteristics
With this scenario, we want to use the same origin server, but apply different Client Characteristics and Content Characteristics, based on the Client IP associated with the request.
Overview
We'll be fielding requests to a single property hostname, big-games-downloads.com
for a game download. Several CIDR blocks will be called out to use specific Client Characteristics and Content Characteristics to optimize download of the game to those addresses, while requests from all other client IPs will use what's set for these behaviors in the Default Rule.
For ease of use in this scenario, NetStorage is used as the origin for all requests.
Phase 1: Create the Property hostname
We need a new Download Delivery (Download Delivery property with one property hostname and we also want to employ Standard TLS security for access.
The steps that follow outline what you need to do to create the property hostname for this use case.
-
You need a Standard TLS certificate set up the property hostname. This can take a while to provision, so you should create it before you create the Download Delivery property. You need to include the hostname—
big-games-downloads.com
—as a certificate name (CN) or subject alternate name (SAN) in the certificate. -
Create a new Download Delivery property in Akamai Control Center.
-
Set up a Standard TLS Property Hostname to Edge hostname association for
big-games-downloads.com
.
Phase 2: Add a new rule for specific Client IP requests
For certain requesting clients, we want to optimize delivery in a specific way. So, we're incorporating this rule to target requests from various CIDR blocks to use specific Client Characteristics and Content Characteristics behavior settings.
-
In the Property Configuration Settings click Add Rule.
-
Ensure Blank Rule Template is selected (default) and click Insert Rule.
-
Click the gear icon in the new rule and select Edit Name. Input a desired name and press Enter. For example, we'll set this to "CIDR block optimization."
-
Click Add Match and set the fields as follows:
- Client IP
- is one of
- Select Items. Click this field and input a range of CIDR blocks that represent IP addresses in the desired geographic location.
Add behaviors to this rule
Add these behaviors to the new rule and configure them accordingly.
Add the Client Characteristics behavior
First, we'll add this behavior to optimize delivery based on the requesting client.
-
Click Add Behavior.
-
Type client in the Search available behaviors field to filter results, select Client Characteristics, and click Insert Behavior. Set Client Location to a geographic region that best represents the CIDR blocks you set for the match criteria. This optimizes the delivery of the game to the clients in this geography.
Add the Content Characteristics behavior
Next, add this behavior to optimize delivery based on the type of content you're delivering.
-
Click Add Behavior.
-
Type content in the Search available behaviors field to filter results, select Content Characteristics, and click Insert Behavior. Set the options in this behavior as follows:
-
Origin Object Size. The game is 5GB in size, so set this to Greater than 100MB. This is what Akamai considers a "large file," so partial object caching is automatically applied to optimize delivery.
-
Popularity Distribution. The popularity setting doesn't really apply to this rule, because it only applies to a select range of CIDR blocks. So, set this to Unknown.
-
Catalog Size. This applies to the size of the overall catalog of content to be delivered. A single game that's 5GB in size is being delivered. So, this constitutes a Small catalog size.
-
Content Type. Set this to Game.
-
Optimize for Foreground Download. Set this slider to Yes. It optimizes the delivery throughput and download times for the "large files" for this scenario.
-
Phase 3: Configure the Default Rule
Now, you configure the Default Rule to handle all other requests, as well as settings you want to be applied to all requests. For example, we'll configure "NetStorage" as the Origin Server for all requests. Access this rule and set the use case-based behaviors, accordingly.
Configure the Origin Server behavior
Set the Origin Type to NetStorage and select the applicable NetStorage Account that houses the game to be downloaded. See the Property Manager documentation for more details on configuring NetStorage as your origin.
Configure the Origin Characteristics behavior
Set these options:
-
Origin Location. Set this to the geographic location that corresponds to the NetStorage Account you set in the Origin Server behavior.
-
Authentication Method. Akamai Origins - Auto, Others - None
Configure the Content Characteristics behavior
Set the same options you applied for this behavior in the CIDR block optimization rule, except for the following:
- Popularity Distribution. This is going to apply to all other requests for this game. To best optimize all of these requests, set this to Popular.
Configure the Client Characteristics behavior
The Default Rule will apply to requests from all other clients accessing the game download. So, set Client Location to Unknown.
What happens next?
First, you need to complete creation of the Download Delivery property, optionally test it, and finally promote it to production for use.
Once live in production, request logic for your content works as follows:
-
A request to
https://big-games-downloads.com
from within a specified CIDR block. When a request comes in that meets the match criteria in the "CIDR block optimization" rule, Akamai will cache the game in edge servers in the Client Location geography that you selected in that rule. It will additionally optimize delivery based on the settings you've applied in that rule's Content Characteristics behavior. As additional requests from the CIDR blocks set in the rule are received, they'll be directed to the cached content, allowing for quicker download. -
A request to
https://big-games-downloads.com
from outside the specified CIDR blocks. The Client Characteristics setting in the Default Rule is used for these requests. It was set to "Unknown" to support all other geographies. Akamai will still cache the game in edge servers as requests come from random geographies, but only until the cache's time to live expires. However, these requests will still be optimized to some extent, using the settings you've applied for the Content Characteristics behavior in the Default Rule.
You could implement multiple instances of the "CIDR block optimization" rule for other geographic regions, and add more CIDR blocks to further expand this scenario.
Updated over 2 years ago