The SaaS dynamic origin

You can follow each of the sections in this workflow to add a SaaS dynamic origin server in your property.

Before you begin: Understand the request flow

This is optional, but it's recommended. Take a minute to familiarize yourself with the flow of a request involving the ​Akamai​ network.

1. Get your SaaS origin set up

During set up of your SaaS dynamic origin, you established a hostname for it that's comprised of two parts. You'll need both of these parts to set it up as your origin.

2. Set up the Origin Server behavior

You need to apply some settings in the Property Configuration Settings to set up your SaaS dynamic origin. We're using the Origin Server behavior in the Default Rule so that NetStorage is the origin for all requests.

  1. In the property version, select the Default Rule.

  2. In the Origin Server behavior, select SaaS Dynamic Origin from Origin Type.

  3. Complete the following SaaS-specific fields:

Field Description
Origin Source

Select the request component that will identify this SaaS dynamic origin. Options include:

  • Hostname. (Default) Uses information contained in the host header.
  • Path. Uses information in the directory structure (after the hostname).
  • Query String. Uses information contained in a query string parameter.
  • Cookie. Uses information from a specific cookie.
Use CNAME Chain?

Select whether to use a CNAME chain to determine the hostname for this SaaS dynamic origin.

CNAME Level

If using a CNAME chain, enter the number of the CNAME level to extract information from. Level numbers start at 0 (the first ​Akamai​ Edge hostname) and are read from right to left.

Query Parameter

If you selected query string for the origin source, enter the query parameter that will identify this SaaS origin.

Cookie Name

If you selected cookies for the origin source, enter the cookie that will identify this SaaS origin.

Regular Expression

Specify the regular expression for the substitution pattern that defines the SaaS dynamic origin's prefix. Use a Perl Compatible Regular Expression (PCRE). To learn more, see Substitution pattern examples for SaaS identifiers. You can also use our regular expression tester.

Replacement

Use elements from the pattern match to construct the origin DNS record. You may include parts of the regular expression in the replacement. To learn more, see Substitution pattern examples for SaaS identifiers.

Domain Name Suffix

Enter the static part of the SaaS dynamic origin, which includes an origin hostname suffix that is one level deeper than a public suffix (for example, .com, .co.uk), but is not a subdomain.

  1. Complete the remaining fields as needed.

  2. Click Save.

Substitution pattern examples for SaaS identifiers

When setting up the regular expressions for your SaaS identifiers, you have to be careful about the syntax. It's possible to generate identifiers that don't result in your desired substitution pattern. You need to use a Perl-compatible Regular Expression (PCRE). A PCRE uses Perl 5 syntax and semantics to perform regular expression pattern matching.

The basic syntax for a PCRE is as follows:

s/<Pattern>/<Replacement>

For example:

s/([a-z]+)/cust-ID

PCRE examples

The examples in this section use the following variables:

  • Customer name. cust3453ipqa
  • Replacement field entry. $1-ak-UID

Substitution Pattern Regular Expression Resulting Identifier Explanation

s/([a-z]+)/$1-ak-UID/

([a-z]+)

cust-ak-UID3453ipqa

Only the cust portion of the customer name matches because the regular expression lacks:

  • match criteria for the numerical portion of the customer name, and
  • a quantifier

The unmatched portion of the customer name is appended to the end of the identifier.

s/([a-z]+).*?$/$1-ak-UID/

([a-z]+).*?$

cust-ak-UID

Because the regular expression includes a character match ( . ) of "any," and a quantifier (*?), the numeric portion of the customer name is discarded in the resulting identifier.

s/([0-9]+)/$1-ak-UID/

([0-9]+)

cust3453-ak-UIDipqa

Because the regular expression starts matching based on the numerical portion of the customer name, the resulting identifier begins with cust. However, the unmatched portion of the customer name is appended to the end of the identifier because the regular expression lacks match criteria for the final section of the customer name (ipqa), and a quantifier.

s/^.*?([0-9]+).*?$/$1-ak-UID/

^.*?([0-9]+).*?$

3453-ak-UID

The non-numeric portion of the customer name is discarded in the resulting identifier because the regular expression includes the following before the numeric range ([0-9]):

  • an anchor (^),
  • an any character match (.), and
  • a quantifier (*?).