CDN Deployment

Whether caching html is the key indicator which option of below that should be chosen. You can only cache HTML object behind SiteSpect since the main testing programs are against the HTML files, those shouldn't be cached in front of SiteSpect.

Without Caching HTML

If you do not cache HTML at the CDN, then SiteSpect deploys your configuration as shown below. This configuration allows you to continue to serve static content from the CDN while allowing you to make full use of the SiteSpect platform.

Your CDN will be configured to route all HTML objects to SiteSpect, while routing most all other objects to your web server infrastructure. SiteSpect provides a DNS name that your CDN will use as an origin when routing traffic to SiteSpect. Traffic received by SiteSpect is proxied to your web server infrastructure for content.


CDN Deployment Without Caching
 

Rules for CDN Without Caching HTML

Implement the following rules on your CDN configuration. Perform these steps in the order we present them:

1. Ensure that the CDN always uses the SiteSpect Origin for requests that include /__ssobj/ or ?SS_PREVIEW_EXP query string in the path.


2. Ensure that requests for objects with /__ssobj/ or ?SS_PREVIEW_EXP query string in the path are not cached in front of SiteSpect. However, the following paths are an exception and may be stored at the CDN layer (we recommend a TTL of 60 minutes):

  • /__ssobj/core.js
  • /__ssobj/core-debug.js
  • /__ssobj/preview_history.js
  • /__ssobj/inlinedit.js
  • Anything under /__ssobj/static/

3. Follow these additional special handling instructions for requests for objects with /__ssobj/ or ?SS_PREVIEW_EXP in the path:
    • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
    • If the request includes ?SS_PREVIEW_EXP in the path, disable all Front End Optimization for the user’s session.
    • Stop processing all other SiteSpect rules.
    4. If the request is for a binary object (provided by the client):
      • Serve the request using the client’s defined caching rules or from the Client Origin.
      • Stop processing all other SiteSpect rules.
      5. If the SSLB cookie is present in the request and has a value of 0:
        • Serve the request using the client’s defined caching rules or from the Client Origin.

        Stop processing all other SiteSpect rules.

        6. If no SSLB cookie is present in the request, route the request to the SiteSpect Origin or to the Client Origin, based on an agreed upon percentage split:

          • When routing the request to the Client Origin:
            • Serve the request using the client’s defined caching rules or from the Client Origin.
            • Optionally, on the response, set the SSLB cookie as a session-only cookie and give it a value of “0”, path or “/”, and set it to the top level domain (i.e., .example.com).
            • Stop processing all other SiteSpect rules.
          • When routing the request to the SiteSpect Origin:
            • Do not cache the response.
            • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
            • Stop processing all other SiteSpect rules.
          7. If the SSLB cookie is present in the request and has a value of 1:
          • Route the request to the SiteSpect Origin.
          • Do not cache the response.
          • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
          • Stop processing all other SiteSpect rules.

          * Note - rules 5,6,7 are optional.

          With Caching HTML

          If you cache HTML at the CDN, then SiteSpect deploys your configuration as shown in the following image. This configuration allows you to continue to serve static content from the CDN, including HTML content, while allowing you to make full use of the SiteSpect platform.

          Your CDN is configured to route all HTML objects to SiteSpect, while routing most all other objects to your web server infrastructure. SiteSpect will provide a DNS name that your CDN will use as an origin when routing traffic to SiteSpect. Traffic received by SiteSpect will be proxied back to your CDN for content, preferably a cached response.


          CDN Deployment With Caching

          Rules for CDN With Caching

          Implement the following rules on your CDN configuration. Perform these steps in the order we present them:

          1. When proxying a request to the SiteSpect Origin, the CDN must set an SSVisit:1 Request Header.
          2. If the SSVisit:1 Request Header is included in the request, then:
          • Serve content from the CDN cache or from the Client Origin.
          • Stop processing SiteSpect rules.

          3. Ensure that the CDN always uses the SiteSpect Origin for requests that include /__ssobj/ or ?SS_PREVIEW_EXP in the path.

          4. Ensure that requests for objects with /__ssobj/ or ?SS_PREVIEW_EXP in the path are not cached in front of SiteSpect. However, the following paths are an exception and may be stored at the CDN layer (we recommend a TTL of 60 minutes):

          • /__ssobj/core.js
          • /__ssobj/core-debug.js
          • /__ssobj/preview_history.js
          • /__ssobj/inlinedit.js
          • Anything under /__ssobj/static/
          5. Follow these additional special handling instructions for requests for objects with /__ssobj/ or ?SS_PREVIEW_EXP in the path:
          • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
          • If the request includes ?SS_PREVIEW_EXP in the path, disable all Front End Optimization for the user’s session.
          • Stop processing all other SiteSpect rules.
          6. If the request is for a binary object (provided by the client):
          • Serve the request using the client’s defined caching rules or from the Client Origin.
          • Stop processing all other SiteSpect rules.
          7. If the SSLB cookie is present in the request and has a value of 0:
          • Serve the request using the client’s defined caching rules or from the Client Origin.
          • Stop processing all other SiteSpect rules.
          8. If no SSLB cookie is present in the request, route the request to the SiteSpect Origin or to the Client Origin, based on an agreed upon percentage split:
          • When routing the request to the Client Origin:
            • Serve the request using the client’s defined caching rules or from the Client Origin.
            • Optionally, on the response, set the SSLB cookie as a session-only cookie and give it a value of “0”, path or “/”, and set it to the top level domain (i.e., .example.com).
            • Stop processing all other SiteSpect rules.
          • When routing the request to the SiteSpect Origin:
            • Do not cache the response.
            • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
            • Stop processing all other SiteSpect rules.
          9. If the SSLB cookie is present in the request and has a value of 1:
          • Route the request to the SiteSpect Origin.
          • Do not cache the response.
          • Maintain and do not overwrite any cookies and caching headers set by SiteSpect.
          • Stop processing all other SiteSpect rules.
          *Note - rules 7,8,9 are optional.