Set up your property

You need to set up a delivery configuration, or "property" to determine how your site or app will be delivered to requesting clients. We'll use ​a few operations in the Property Manager API (PAPI) to do this.

Before you begin

When you set up identity and access, you worked with your ​Akamai​ account team to set everything up. You need the unique alphanumeric value assigned to your contract and primary group, prefaced by their PAPI prefixes ctr_<value> and grp_<value>, respectively. If you don't have these values, you can use the Property Manager API (PAPI) to get them.

📘

Which Ion version do you have?

You can have one of two versions of Ion on your contract. API operations use the codename values that ​​Akamai​ established for these versions during development:

  • Ion Premier. SPM
  • Ion Standard. FRESCA

Make note of the codename for your version, because you'll need this later, too.


1 - Create an edge hostname

Here, we'll create the hostname that's used to redirect requests for your site or app to ​Akamai​ edge servers.

What's an edge hostname?

You provide us with a domain that your customers use to access your site or app and ​Akamai​ appends a specific domain to it. Here's an example:

You'll also apply the certificate you created to secure it. Later, you'll need to update your existing DNS record for your site or app to be a CNAME record that points to the edge hostname. As a result, a client request to your domain is rerouted to the edge hostname and securely sent to an optimal ​Akamai​ edge server, where your delivery configuration (property) is read. You'll set up this property later to determine how to best deliver your site or app to a client.

Get your domains

When you created your enrollment, you provided a domain to serve as your common name (cn). You'll need this exact value. If you added any other domains to your enrollment as subject alternative names (sans), you'll need them, too. If you don't have these values, you can use the list enrollments operation to get them.

👍

Wait for your certificate to finish

If your certificate hasn't gone through all of the phases for completion, you should wait until it does. The person you set as your certificate administrator will get a confirmation email when it's ready to go.

Create your edge hostname

To create the edge hostname, you can use a single operation in PAPI.

Check hostname status (optional)

The email address for your primary admin user will receive a confirmation message when your edge hostname is ready. But, you can also run an operation in PAPI to check its status.


2 - Create your Ion property

To set up your delivery using Ion, you need to create an Ion property.


3 - Add your edge hostnames

The edge hostnames you created for your site need to be added to your Ion property. If you didn't store their unique ID values, you can run the List edge hostnames operation to get them.

With the IDs stored, add your edge hostnames.


4 - Get the rule tree

Get the baseline of your Ion property's rule tree. It includes all of the default rules and behaviors that ​​Akamai​ adds.


5 - Edit the rule tree

Your new rule tree includes several rules and behaviors by default. A lot of them are preset to help optimize the delivery of your site. There are a few of them that require that you apply some settings. There are others that you should ensure are enabled.

👍

Rule trees are maintained in a special form of JSON that you can edit and validate in the dedicated VS code or Eclipse IDE plugins.

Set NetStorage as your origin

Configure the origin behavior in the defaultRule to use your NetStorage storage group as your origin server for all requests for your site. Look for the origin behavior in your rule tree and set the values as follows:

{
    "name": "origin",
    "options": {
        "originType": "NET_STORAGE",
        "netStorage": {
            "cpCode": 1234567,
            "name": docsassociates.com
        }
    }
},
  • originType. Set this to NET_STORAGE for a NetStorage origin server.
  • cpCode. This is the numeric identifier that ​Akamai​ set up for the CP code for your NetStorage storage group. (You should have used this same value to set up the storage group.)
  • name. The name of your NetStorage storage group.

Apply your Ion cpCode

You should have had at least one CP code for Ion set up when you originally worked with your account team. You need to add it to your Ion property to track the delivery of your website or app through the ​​Akamai​ edge network.

You can find it as a behavior in the Traffic Reporting child rule in your rule tree.

{
    "name": "cpCode",
    "options": {
        "value": {
            "id": 678901,
             "name": "docsassociates.com",
            "description": "The CP code for the Ion property for docsassociates.com",
            "products": [
                "SPM"
             ]
         }
     }
 }

Set the values as follows:

  • id. This is the numeric identifier that ​Akamai​ set up for your CP code for Ion use.
  • name. This is the unique, alphanumeric name value you set up for your Ion CP code.
  • description. You can optionally include a description for your Ion CP code.
  • products. Set this to the codename for your version of IonSPM for Ion Premier or FRESCA for Ion Standard.

Enable mPulse

mPulse is a real user monitoring (RUM) solution that collects and analyzes detailed information about your users' experience whenever they visit your site or app. It's used with other Ion features to help accelerate delivery. So, we want to make sure it's enabled. mPulse RUM is a sub-rule of the Augment insights child rule. Make sure it's set as follows:

{
    "name": "mPulse RUM",
    "children": [],
    "behaviors": [
        {
            "name": "mPulse",
            "options": {
                "apiKey": "",
                "bufferSize": "",
                "configOverride": "",
                "enabled": true,
                "loaderVersion": "V12",
                "requirePci": false,
                "titleOptional": ""
            }
        }
    ],
    "criteria": [],
    "criteriaMustSatisfy": "all",
    "comments": "Collect..."
},

We're just looking to enable mPulse for now. Leave all of the empty values as they are. You can always create a new version of your rule tree later, and customize the mPulse settings.

Enable adaptiveAcceleration

Adaptive Acceleration improves HTML page load performance by prepositioning content. It uses ​​Akamai​'s learning engine that's powered by real user data gathered via mPulse. It provides site acceleration and can incrementally improve the rendering process by up to 5%. Adaptive acceleration is a sub-rule of the Accelerate delivery child rule. Make sure it's set as follows:

{
    "name": "Adaptive acceleration",
    "children": [],
    "behaviors": [
        {
            "name": "adaptiveAcceleration",
            "options": {
                "enableBrotliCompression": false,
                "enablePreconnect": true,
                "enablePush": true,
                "enableRo": false,
                "preloadEnable": true,
                "source": "mPulse",
                "titleHttp2ServerPush": "",
                "titlePreconnect": "",
                "titlePreload": "",
                "titleRo": "",
                "compression": "",
                "titleBrotli": "",
                "enableForNoncacheable": false
            }
        }
    ],
    "criteria": [],
    "criteriaMustSatisfy": "all",
    "comments": "Automatically..."
}

Similar to mPulse we're just looking to enable Adaptive Acceleration in your Ion property. You can always create a new version of your rule tree later and customize the adaptiveAcceleration settings.

Enable caching

Caching your website content on edge servers makes it closer to end users to help speed up delivery. You should add some form of caching to your Ion property, and apply various caching settings to support NetStorage as your origin server.

  1. In the Offload origin child rule, scroll past all of the children entries until you see the root behaviors array.

  2. In the caching object, set its options:

    • behavior. Set this to "MAX_AGE" which enables caching for your site.
    • mustRevalidate. Set to false, stale content will be served to a request if it can't be validated on NetStorage. (This way, a 404 error isn't returned because the requested content can't be found.)
    • ttl. This is the number of seconds content should be kept in cache before checking to see if newer content is available on your origin. With NetStorage as your origin, set this to 600s (10 minutes). This gives NetStorage enough time to index and access your content if it's changed.
{
    "name": "caching",
    "options": {
        "behavior": "MAX_AGE",
        "mustRevalidate": false,
        "ttl": "600s"
    }
},
  1. Scroll down to the cacheError object and set it's options:

    • enabled. Set this to true.
    • ttl. This is the number of seconds HTTP Error Responses should be kept in the cache. Set this to 30s to give NetStorage enough time to address and log errors.
    • preserveStale. Set to true, stale HTTP Error Responses will be served to a request if it can't be validated on NetStorage.
{
    "name": "cacheError",
    "options": {
        "enabled": true,
        "ttl": "30s",
        "preserveStale": true
    }
},
  1. In the cacheKeyQueryParams, set it to IGNORE_ALL. NetStorage doesn't honor query strings.
{
    "name": "cacheKeyQueryParams",
    "options": {
        "behavior": "IGNORE_ALL"
    }
},
  1. Find the HTML pages child rule and configure its behaviors array to match other caching settings you've applied for NetStorage.
"name": "HTML pages",
    "children": [],
    "behaviors": [
        {
            "name": "caching",
            "options": {
                "behavior": "MAX_AGE",
                "mustRevalidate": false,
                "ttl": "600s"
            }
        },
        {
            "name": "cacheKeyQueryParams",
            "options": {
                "behavior": "IGNORE_ALL"
            }
        }
    ],

Disable sureRoute

SureRoute optimizes the connection between edge servers and an origin server, specifically for non-cacheable content. Since we're using NetStorage as your origin, and we want to cache content, SureRoute doesn't apply.

It's in the Protocol optimizations sub-rule in the Accelerate delivery child rule. Ensure it's set like this:

{
    "name": "sureRoute",
    "options": {
        "enabled": false,
        "srDownloadLinkTitle": ""
    }
}

Add autoDomainValidation (recommended)

Earlier, you set up a domain-validated certificate to protect the connection between a requesting client and the ​Akamai​ edge network via HTTPS. This certificate has a lifecycle of 90 days. After which, you need to renew it. You can add autoDomainValidation to your rule tree to automate this renewal.

  1. Find the behaviors array in your rule tree that also includes the origin behavior (that you set up to use NET_STORAGE).

  2. Add this object below the origin object (adding a comma to the end of that object) to include this behavior in the Default Rule.

"behaviors": [
    {
        "name": "origin",
        "options": {
            "originType": "NET_STORAGE",
            "netStorage": {
                "cpCode": 1234567,
                "name": docsassociates.com
            }
        }
    },
    {
        "name": "autoDomainValidation",
        "options": {
            "autodv": ""
        }
    }
],

📘

You don't need to set any options. Just include this object to enable this feature.

Set this way, the behavior applies to all of the edge hostnames you've set in your Ion property that use a Standard TLS, domain-validated certificate. Auto-renewal of your certificate will start 16 days before its 90-day lifecycle.

What about the rest of the rule tree?

Leave everything else in the tree at its default. A new Ion property includes several rules and behaviors that are preset as a best practice, and others are optional. You don't need to change any of them now. You can always create a new version of your property later and make changes.


6 - Validate rule tree changes

You should make sure your JSON file is correct and complete. You need to resolve returned errors, because they will block you when you try to activate your Ion property. If you've set your Ion property up as we've told you to, you shouldn't run into any blocking errors.

Both the VS code and Eclipse plugins support full rule tree validation.


7 - Update the rule tree

Push your updated JSON rule tree to your Ion property.


What’s Next