Separate origins and different auth methods

With this use case, we'll set up two separate property hostname to edge hostname associations ("property hostnames") to field requests to separate origins, and streamline delivery from each by using unique Origin Characteristics.

Overview

In this scenario, we'll be fielding requests to two property hostnames to deliver image file content that is hosted on two separate origin servers. It assumes that these requests are originating from one of two URLs:

  • https://quick-images-hi-res.com. A user targets this URL to request high-resolution ("hi-res") image content.
  • http://quick-images-lo-res.com. A user targets this URL to request low-resolution ("lo-res") image content.

The lo-res images are hosted on NetStorage and will be accessible via HTTP requests. The hi-res images are hosted on a Google Cloud Platform origin and require secure, Standard TLS authentication.

Phase 1: Create the property hostnames

We need a new OD property with two property hostnames. We want to employ Standard TLS security (HTTPS) access for the hi-res content, and standard HTTP access for the lo-res content.



The steps that follow outline what you need to do to create the property hostnames for this use case.

  1. You need a Standard TLS certificate set up for the quick-images-hi-res.com hostname. This can take awhile to provision, so you should create it before you create the OD property. You need to include the hostname as a certificate name (CN) or subject alternate name (SAN) in the certificate.
  2. Create a new OD property in Control Center.
  3. Set up a Standard TLS Property Hostname to Edge hostname association for "quick-images-hi-res.com."
  4. Set up a custom HTTP property hostname to edge hostname association for "quick-images-lo-res.com.

Phase 2: Add a new rule for the lo-res image requests

For download requests to http://quick-images-lo-res.com, we want to ensure that low-res images are served from the proper origin and optimized for delivery. So, we incorporate a separate rule to target requests for that URL, and to use specific Origin Characteristics and Content Characteristics behavior settings.

  1. In the Property Configuration Settings click Add Rule.
  2. Ensure Blank Rule Template is selected (default) and click Insert Rule.
  3. Click the gear icon in the New Rule and select Edit Name. Input a desired name (for example, "Lo-res NetStorage") and press Enter.
  4. Click Add Match and set the fields as follows:
    • Hostname
    • is one of
    • Select Items. Click this field and input the property hostname for the lo-res images—"quick-images-lo-res.com."
  5. Click Add Behavior.
  6. Type "origin" in the Search available behaviors field to filter results, select Origin Server, and click Insert Behavior. Set the options in this behavior as follows:
    • Origin Type: NetStorage
    • NetStorage Account: Click to select the NetStorage account associated with the storage group that houses the lo-res images.
  7. Repeat steps 5-6, to add the Origin Characteristics and Content Characteristics behaviors.
    Behavior Options
    Origin Characteristics Set these options to optimize delivery of the lo-res images from NetStorage.
    • Origin Location. Set this to the geographic location that represents the NetStorage Account you set in the Origin Server behavior.
    • Authentication Method. Akamai Origins - Auto, Others - None
    Content Characteristics We know that the following apply for our lo-res image content, so we set these options, accordingly:
    • Origin Object Size. These are low-resolution images, so they're all "Less than 1MB."
    • Popularity Distribution: We're not sure of the popularity, so we set this to "Unknown."
    • Catalog Size. This is the overall size of the lo-res image catalog. For this example, the catalog is less than 1TB in size, so set this to "Medium."
    • Content Type. Set this to "Images."
    Tip: Full details on these options, including recommendations on usage can be found in the Content Characteristics topic.

Phase 3: Configure the Default Rule for hi-res image requests

In this use case, the majority of the requests will be coming for hi-res images. So, we'll configure the Default Rule to handle these requests. We need to set the Origin Server as "Your Origin" to incorporate Google Cloud Platform as the origin and apply Origin Characteristics optimization for it.

Access the Default Rule and set the use case-based behaviors.

Behavior Options
Origin Server For this scenario, we set this to "Your Origin."

Configure settings here for a Google Cloud Platform origin. This is covered in detail in the I selected "Your Origin" topic in the Property Manager help.

Origin Characteristics Set the these options:
  • Origin Location. Set this to the geographic location that best matches the location of "Your Origin."
  • Authentication Method. Akamai For this use case, we'd select "Google Cloud Platform."
Tip: Full details on these options, including recommendations on usage can be found in the Origin Characteristics topic.
Content Characteristics We know that the following apply for our hi-res images, so we set these options, accordingly:
  • Origin Object Size. Most of these hi-res images are larger than 1MB, but not larger than 10MB. So, this is set to "1-10MB."
  • Popularity Distribution. This is the most popular content, but it doesn't specifically fall into either of the two use cases. So, set this to "Other."
  • Catalog Size. This is the overall size of the high-res image catalog. For this example, the catalog is more than 1 TB in size, but not larger than 100TB. So, set this to "Large."
  • Content Type. Set this to "Images."
Tip: Full details on these options, including recommendations on usage can be found in the Content Characteristics topic.
Client Characteristics For this use case, all requesting clients are in the United States and Canada. So, set the Client Location option to "North America."

Note that we didn't set up this behavior in the "Lo-res NetStorage" rule. This is because all requests—for both the hi-res and lo-res images—will originate in the U.S. or Canada. So, we set it up here in the Default Rule so it applies to all requests.

What happens next?

First, you need to complete creation of the OD 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 "http://quick-images-lo-res.com". Since this matches the "quick-images-lo-res.com" property hostname set in the "Lo-res NetStorage" rule, its Origin Server is used, and its versions of the Origin Characteristics and Content Characteristics behaviors are applied. However, the Default Rule applies to all requests. So, all of its additional behaviors are also applied—use case-based behaviors or not. (For example, what you've set for the Client Characteristics behavior in the Default Rule is used because there is no instance of that use case-based behavior in the "Lo-res NetStorage" rule.)
  • A request to "https://quick-images-hi-res.com". The "Lo-res NetStorage" rule is checked first, but this request doesn't match its criteria. So, the request references the Default Rule, and its Origin Server is used, as well as what's been set in its instances of the Origin Characteristics and Content Characteristics behaviors.