Setup The package simply needs to be installed and configured for the desired CDN s distribution server.



Similar documents
Sitecore Dynamic Links

Getting Started with AWS. Hosting a Static Website

Creating "Origin Pull" on Akamai (1)

Content Delivery Network. Version 0.95

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

Engagement Analytics Configuration Reference Guide

Front-End Performance Testing and Optimization

Accelerating Wordpress for Pagerank and Profit

Cache Configuration Reference

Drupal CMS for marketing sites

Content Delivery Networks (CDN) Dr. Yingwu Zhu

Getting Started with AWS. Hosting a Static Website

The importance of Drupal Cache. Luis F. Ribeiro Ci&T Inc. 2013

Slide.Show Quick Start Guide

Configuring Load Balancing

(An) Optimal Drupal 7 Module Configuration for Site Performance JOE PRICE

Click Studios. Passwordstate. Installation Instructions

MASTERTAG DEVELOPER GUIDE

escan SBS 2008 Installation Guide

F-Secure Messaging Security Gateway. Deployment Guide

Getting Started with AWS. Static Website Hosting

Optimizing WordPress Performance: Page Speed and Load Times. Doug Yuen

Bazaarvoice for Magento Extension Implementation Guide v6.3.4

Installation, Configuration, and Usage

Creating a generic user-password application profile

How to set up & configure GADD Dashboard Server 1.4

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

CloudOYE CDN USER MANUAL

CDN Operation Manual

Click Studios. Passwordstate. Upgrade Instructions to V7 from V5.xx

ClickDimensions Quick Start Guide For Microsoft Dynamics CRM /1/2011 ClickDimensions

Web Performance. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 2014/15. Sérgio Nunes

Analytics Configuration Reference

Going Beyond SAP ITS Mobile Apps to a Responsive Design Mobile Apps. JK (JayaKumar Pedapudi) Principal Consultant NTT DATA, Inc.

Basic Exchange Setup Guide

Spectrum Technology Platform

Active Directory Requirements and Setup

Click-To-Talk. ZyXEL IP PBX License IP PBX LOGIN DETAILS. Edition 1, 07/2009. LAN IP: WAN IP:

CMS Diagnostics Guide

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Portals and Hosted Files

CREATE A CUSTOM THEME WEBSPHERE PORTAL

BizFlow 9.0 BizCoves BluePrint

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

CMS Performance Tuning Guide

Working With Virtual Hosts on Pramati Server

Django Assess Managed Nicely Documentation

Administrator s Guide

Managing Qualys Scanners

W3Perl A free logfile analyzer

603: Enhancing mobile device experience with NetScaler MobileStream Hands-on Lab Exercise Guide

Canonical. Plugin for Joomla! This manual documents version 3.11.x of the Joomla! extension.

Eylean server deployment guide

ScanJour PDF 2014 R8. Configuration Guide

Performance Testing for Ajax Applications

Ajax Performance Tuning and Best Practice

Configuring. Moodle. Chapter 82

WompMobile Technical FAQ

SEO Checker User manual

Blue Coat Security First Steps Solution for Deploying an Explicit Proxy

Self-Hosted Implementation

PLAYER DEVELOPER GUIDE

GpsGate Server. Installation and Administration Guide. Version: 2.2 Rev: 2

Tracking Campaigns with G-Lock Analytics

Quick Start Guide. Installation and Setup

Sitecore Security Hardening Guide

Click Studios. Passwordstate. Installation Instructions

Click Studios. Passwordstate. High Availability Installation Instructions

Web Development 1 A4 Project Description Web Architecture

The purpose of jquery is to make it much easier to use JavaScript on your website.

V Series Rapid Deployment Version 7.5

Project 2: Web Security Pitfalls

Form And List. SuperUsers. Configuring Moderation & Feedback Management Setti. Troubleshooting: Feedback Doesn't Send

Immersion Day. Creating an Elastic Load Balancer. Rev

INSTALLATION AND CONFIGURATION MANUAL ENCODER

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Configuring iplanet 6.0 Web Server For SSL and non-ssl Redirect

HOW TO CONFIGURE PASS-THRU PROXY FOR ORACLE APPLICATIONS

SuperLumin Nemesis. Administration Guide. February 2011

Mobile Application Performance Report

AUDIT REPORT EXAMPLE

R i o L i n x s u p p o r r i o l i n x. c o m 1 / 3 0 /

Installing Autodesk Vault Server 2012 on Small Business Server 2008

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Protection, Usability and Improvements in Reflected XSS Filters

Password Reset PRO. Quick Setup Guide for Single Server or Two-Tier Installation

How To Understand The Power Of A Content Delivery Network (Cdn)

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

Virtual Appliance Setup Guide

Improving Magento Front-End Performance

ediscovery 6.0 Release Notes

Table of Contents. This whitepaper outlines how to configure the operating environment for MailEnable s implementation of Exchange ActiveSync.

SizmekFeatures. HTML5JSSyncFeature

AD Phonebook 2.2. Installation and configuration. Dovestones Software

Transcription:

NTT DATA Sitecore CDN Connector Overview The CDN Connector for Sitecore allows developers to route all media requests (dynamic and static) through a proxy CDN. It is designed to be plug-n-play requiring no additional development effort other than configuration. Media Rerouting Media URLs that would traditionally be handled by the web server would be rewritten to point to a geographically appropriate edge server which will cache media items from the origin server as they are requested. This takes a large amount of load off the web (origin) server. An example using AWS CloudFront would be: Setup The package simply needs to be installed and configured for the desired CDN s distribution server. If working with AWS CloudFront, you can follow the below steps for setting up a distribution.

Setting up the distribution in AWS 1. Sign into the AWS console, then the CloudFront tab. 2. Click Create Distribution 3. Choose the Download delivery method 4. Provide the hostname of your public facing web server as the Origin Domain Name and accept the defaults 5. Choose Yes for Forward Query Strings. The rest of the default values are fine 6. Accept the default values for the Distribution Details. CNAMEs are optional domain names you can set up from your DNS to point to the CloudFront domain name you ll receive later. (Example: media.site.com ) 7. Click through the rest of the wizard and you ll be returned to the distribution list

8. Click on your new distribution and copy the Domain Name. This is the publicly provided hostname if you are not using your own custom CNAMEs. If you are using custom CNAMEs use this Domain Name as the CNAME s target. 9. You will have to wait for the distributions status to change from In Progress to Enabled before you can test this. Installing on the sitecore application Ensure the following files are installed 1. /bin/nttdata.sitecorecdn.dll 2. /App_config/Include/SitecoreCDN.config In your web.config, do the following: 1. Under /system.webserver/handlers/ ADD <add verb="*" path="aws_minify.ashx" type="nttdata.sitecorecdn.handlers.minifyhandler, NTTData.SitecoreCDN" name="sitecorecdn.minify" /> BEFORE <add verb="*" path="sitecore_handlers.ashx" type="sitecore.web.customhandlerfactory, Sitecore.Kernel" name="sitecore.generichandler"/> 2. Under /system.web/httphandlers/ ADD <add path="aws_minify.ashx" verb="*" type="nttdata.sitecorecdn.handlers.minifyhandler, NTTData.SitecoreCDN" /> BEFORE <add verb="*" path="sitecore_handlers.ashx" type="sitecore.web.customhandlerfactory, Sitecore.Kernel"/> 3. In /App_Config/Includes/SitecoreCDN.config set the hostname of your CDN per site. <sites> <site name="website"> <patch:attribute name="cdnhostname">yourcdnhostname</patch:attribute> </site> </sites> Html Rewriting The module rewrites the resulting html at the last moment by overriding the Response.Filter stream. A pipeline processor NTTData.SitecoreCDN.Pipelines.CDNAttachFilter is located under <httprequestprocessed> <processor type="nttdata.sitecorecdn.pipelines.cdnattachfilter, NTTData.SitecoreCDN"/> </httprequestprocessed> This pipeline decides whether to attach the Response.Filter based on a few criteria 1. Sitecore.Context.Item!= null (Item was resolved) a. OR args.url.filepathwithquerystring matches an entry in <processreqeusts> config 2. Sitecore.Context.Site!= null (Context Site resolved)

3. Sitecore.Context.PageMode.IsNormal (Site is not being edited) 4. Sitecore.Context.Site has a cdnhostname attribute set (hostnames are per site) 5. Querystring url parameter?cdn=true false (for overriding default behavior) The rewriting filter then takes all the generated html from the page and replaces urls on these elements <img src= [url] />, <script src= [url] ></script>, and <link href= [url] /> with transformed urls before returning the page to the client. URL Rewriting URLs are rewritten with 3 purposes: 1. Attaching the CDN hostname to make the url fully qualified and pointing to the proxy CDN 2. Attach version information and a datetime stamp to the query string to guarantee uniqueness so the CDN doesn t over-cache a file that s been modified. Dynamic Media Urls Dynamic urls are rewritten from /~/media/path/to/file.ashx?w=300&as=1 to http://cdnhostname/~/media/path/to/file.ashx?w=300&as=1&vs=3& d=20120101t120000 The &vs=3 is this media s sitecore Item version while &d=20120101t120000 is the last modified time of the item for unversioned items. A CDN will treat these rewritten parameters as a unique filename when caching. Static media Urls Static urls are rewritten from /path/to/file.ext to http://cdnhostname/path/to/file.ext?d=20120101t120000 The d=20120101t120000 is the Last Modified date of the file on the file system. A CDN will treat these rewritten parameters as a unique filename when caching. Excluded Urls Certain URLS will be excluded from being rewritten, instead keeping their local url. 1. Any external urls 2. Urls matching any /sitecore/cdn/excludeurls/regex in SitecoreCDN.config 3. Media Items that are not publicly accessible to [domain]\anonymous 4. Media Items that use Analytics Tracking Consuming Rewritten URLs The rewritten URL requests will go to the closest edge server. If the server hasn t previously cached this file, it will go to the origin server to get the first copy. Sitecore must be able to recognize these rewritten urls and recognize the embedded filepath and querystring parameters. A PreProcessRequest pipeline step NTTData.SitecoreCDN.Pipelines.CDNInterceptPipeline is located under <preprocessrequest> <processor type=" NTTData.SitecoreCDN.Pipelines.CDNInterceptPipeline, NTTData.SitecoreCDN"/>

</preprocessrequest> The preprocessor will assess whether the item is a minifiable CSS or JS file and rewrite the URL for the minify handler. Performance Enhancements Minification Static.js and.css requests coming from the CDN can optionally be minified before being delivered. This will result in decrease overall page size and improve load times. This feature can be enabled/disabled in the /app_config/include/sitecorecdn.config <cdn enabled="true" minifyenabled="true" > CSS Processing If minification is enabled, the media handler will also do URL replacements on css url([url]) statements. This ensures that any media referenced within the css also gets the benefit of the rewritten media urls. This feature can be enabled/disabled in the /app_config/include/ SitecoreCDN.config <cdn enabled="true" processcss="true" > JS Fastloading When an.aspx page request is having its urls rewritten, you have the option to automatically move any <script> tags to just before the </body> tag. This allows the browser to parallel load scripts rather than the browser imposed limit of 2 simultaneous downloads of script tags located in the <head>. This feature can be enabled/disabled in the /app_config/include/ SitecoreCDN.config <cdn enabled="true" fastloadjsenabled="true" > Configuration Under /App_Config/Include/ SitecoreCDN.config <cdn enabled="true" filenameversioningenabled="true" minifyenabled="true" fastloadjsenabled="true" processcss="true"> <provider type=" NTTData.SitecoreCDN.Providers.CDNProvider, NTTData.SitecoreCDN" /> <!-- Incoming requests matching these urls will be processed.aspx is processed when Sitecore.Context.Item is resolved --> <processrequests> <regex pattern = "\.asmx" /> <!-- matches any.asmx --> </processrequests> <!-- Incoming requests matching these urls will not be processed --> <excluderequests> <!--<regex pattern = "Default\.aspx" />--> </excluderequests> <!-- These regex patterns will prevent matching urls from being replaced in the outgoing html, doesn't affect Incoming request processing --> <excludeurls> <regex pattern = "\.axd" /> <!-- this keeps ScriptResource.axd and WebResource.axd from being CDN'd--> <regex pattern = "VisitorIdentification.aspx" /> <!-- this keeps the Sitecore Analytics request from being CDN'd --> </excludeurls> </cdn>

On the <cdn> element, enabled="true" turns the HTML rewriting on and off. filenameversioningenabled="true" turns on/off the versioning features of the URL rewrite. minifyenabled ="true" turns on/off the css/js minification. fastloadjsenabled ="true" turns on/off the javascript tag relocation. processcss ="true" turns on/off url rewriting within css files You can override any behavior of the CDNManager class by implementing your own CDNProvider and changing <provider type="nttdata.sitecorecdn.providers.cdnprovider, NTTData.SitecoreCDN" /> You can specify which incoming requests will get Url replacement in <processrequests> by matching regex. By default,.aspx is only processed when Sitecore.Context.Item is not null. You can specify which incoming requests to exclude form Url replacement in <excluderequests> by matching regex. Even when a request is being processed, you can specify a list of URLs that will not be replaced under <excludeurls> by matching regex. Some media item you want going directly to the origin server. For example: Robot identifying files for DMS and.net generated script.axd files.