Presentation is loading. Please wait.

Presentation is loading. Please wait.

Content Delivery Networks with Sitecore

Similar presentations


Presentation on theme: "Content Delivery Networks with Sitecore"— Presentation transcript:

1 Content Delivery Networks with Sitecore
Kamruz Jaman April 25, 2016 #sugcon

2 Take aways There are a number of ways to integrate Content Delivery Networks with Sitecore. Let’s review why, how and of course, let’s hack into the pipelines ;) Some are nothing Sitecore specific, there are some 3rd party more and also there are a surprising number of settings to help us as well. And of course, we can go custom. This is Sitecore after all!

3 About Me Kamruz Jaman Freelance Sitecore Consultant Sitecore Technology MVP

4 Find Me Blog: jammykam.wordpress.com Twitter Sitecore Slack

5 Why use Content Delivery Networks?
Reduce HTTP requests to CD server Offload requests Serve request closer to user Reduce latency Large files Streaming Browser connection limits per domain Reduce HTTP requests to server Reduce Load on server Reduce Latency Increase browser connection limits per domain – more later

6 Why? It confuses users Nobody wants to wait

7 Why? Typically users from across the globe served from a single location Ideally serve closer to user

8 Why? Global traffic pattern that looks more like abstract art than something you can make any sense of Limited budgets mean you can’t keep expanding servers and Sitecore licenses when traffic spikes Need to solve the problem another way…

9 Why? But what we really want to avoid is…

10 How? Integration with Sitecore Edge Caching DAM connector
Faux CDN with Sitecore CDN Endpoints Custom CDN Integration

11 Edge Caching Requests cached by Provider Acts as reverse proxy
Required assets Pulled from origin No code required Must change DNS to provider Akamai / CloudFlare / Amazon CloudFront Must set “MediaResponse.Cacheability” setting in config

12 Edge Caching

13 Edge Caching Akamai DNS All requests go to server
With EDGE caching, the provider caches certain file types by PULLING them from ORIGIN and caching locally Different CDNs have different POP locations – Point of Presence

14 Edge Cache Performance

15 Edge Cache Performance

16 DAM Connector Third party Digital Asset Management Various available
ADAM Software Digizuite DAM for Sitecore PicturePark Brightcove / Ooyala Integration directly in Media Library Fully featured Workflow Image / Video Manipulation Brightcove / Ooyala uses Sitecore Media Framework

17 DAM Connector - PicturePark

18 DAM Connector - Digizuite

19 Faux CDN Domain sharding Increase available connection pool
Can be used with Edge Caching Fake CDN None of the cache benefits Increase in simultaneous server load Browser connection limits: Increase Parallel Connections Chrome / Firefox / Android / Chrome Mobile = 6 IE9 = IE10 = IE11 = 13

20 Browser Connection Limits
Browser Parallel Connection limits

21 Code Sample <site name="mysite" ... hostName=" /> <!-- or can use a wildcard to handle all sub-domains: *.domain.com --> <setting name="Media.MediaLinkServerUrl" value="//media.sugcon.eu" /> <setting name="Media.AlwaysIncludeServerUrl" value="true" /> Static assets can be served from server, Sitecore dynamic from shard Can be used with Edge Caching to increase browser connections Use a protocol-less URL

22 Custom Origin Support on Azure CDN Yes, Finally!!!
Azure CDN Endpoint Custom Origin Support on Azure CDN Yes, Finally!!! Azure CDN can now be used with any origin. Only worked with certain services – Websites and WebRoles Services must be in same Azure Subscription Requests must be served from /CDN in URL Needed to use IIS Rewrite for urls instead Finally catching up! [

23 Azure CDN – Setup

24 Azure CDN – Setup No HTTP/2 Support yet - Azure, AWS, MAxCDN
Supported: - Cloudflare, Akamai, KeyCDN, CDN77

25 Setting changes required
Code Sample Setting changes required <setting name="Media.MediaLinkServerUrl" value="//sugcon.azureedge.net" /> <setting name="Media.AlwaysIncludeServerUrl" value="true" /> <setting name="MediaResponse.Cacheability" value="public" /> MediaResponse.Cacheability -> default = Private Only cached by browser

26 Be careful about Content Expiration
Caching Strategy Be careful about Content Expiration CDN may crash too aggressively Azure CDN defaults to 7 days Enable caching by URL parameters Override Link Manager Append Updated Date or Revision Guid Possible to flush entire CDN cache via REST  Make sure you use “new” Azure Portal  portal.azure.com Azure features are being added more frequently Expire content via REST API (Dec 2015) Pull Origin recently added -

27 Code Sample Override the media link and patch it in

28 Custom Integration Requirements: Using Azure Blob Storage
CDN Endpoint Specific parts of Media Library Media managed through Sitecore interface Large files of 1-2GB approx Media NOT stored in database Sitecore Media Framework too complex Advantage: Requests still served by Sitecore = Analytics

29 Code Parts Azure API – Windows Azure Storage nuget package
Hook into existing Sitecore Pipelines uiUpload / attachFile Custom Pipeline for integration Allow multiple processors for distinct operations Non-UI blocking Sitecore Job to upload Files Intercept media requests Override Link Manager Must support Content and Experience Editor

30 Code demonstration

31 Kerchow! Service users fast when they come to your site!

32 Questions, ideas or remarks?
Thank you! Questions, ideas or remarks?

33 Thank you!


Download ppt "Content Delivery Networks with Sitecore"

Similar presentations


Ads by Google