Origin server

Because these cloudlet types forward incoming requests, their use requires a separate origin server.

  • Audience Segmentation. Segments traffic and sets session stickiness.
  • Forward Rewrite. Rewrites the requested URL and returns a different asset based on location or device.
  • Phased Release. Forwards a defined percentage of your visitors to a particular location.

Create conditional origin

  1. Create a conditional-origin-group.json file.

  2. Within the file, define the Cloudlets Origin Group rule by adding at least one instance of the Cloudlets Origin Definition rule as a child along with the behavior and criteria that fit your business need.

    Use the references to fill out the options for each.

    ReferenceRequiredDescription
    origin✔️Behavior. Specifies the hostname and settings used to contact the origin once service begins.

    For originType, choose CUSTOMER.
    cloudletsOrigin✔️Criteria. Sets your origin ID to a value you provide and use in Cloudlet cmdlets.
    allowCloudletsOrigins✔️Allows cloudlets origins criteria to manage triggers for your cloudlet behaviors independent of your property's other criteria.
    cpCodeBehavior. This behavior applies any valid CP code and overrides the default rule's CP code to manage billing and analytics for your origin.

    {
      "name": "Cloudlets Origin Group",
      "children": [
          {
              "name": "Cloudlets Origin Definition",
              "children": [],
              "behaviors": [
                  {
                      "name": "origin",
                      "options": {}
                  },
                  {
                      "name": "cpCode",
                      "options": {}
                  }
              ],
              "criteria": [
                  {
                      "name": "cloudletsOrigin",
                      "options": {}
                  }
              ],
              "criteriaMustSatisfy": "all"
          }
      ],
      "behaviors": [
          {
              "name": "allowCloudletsOrigins",
              "options": {}
          }
      ],
      "criteria": [],
      "criteriaMustSatisfy": "all"
    }
    
  3. Add the new rule to your property, pointing to the JSON file you created.

    The output returns your rule tree along with any errors or warnings on upload. Set the cmdlet output to a variable to use downstream.

    Set-PropertyRule -PropertyName "my-property" -PropertyVersion latest -InputFile "./conditional-origin-group.json" -VersionNotes "Adding conditional origin"
    

Continue your cloudlet set up by defining its match rules.