36
©2012 AKAMAI | FASTER FORWARD TM

©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Page 2: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

Managing Peak Traffic through Dynamic Base Page Caching Solutions

Jessica McPeake William Ackerman Manuel Alvarez

Page 3: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Should you Care about Dynamic Caching?

•  ROI through Smarter Caching •  Increase Site Performance •  Better Search Engine Ranking •  Static (Web Tier) à Dynamic (App and DB Tiers)

•  Compile the conditional and personalized logic once and store on Akamai’s cloud for future requests

•  Anonymous User Session Management (Including Bots) •  Focus your infrastructure on converting sales and let the Akamai cloud handle

more load •  In top Internet Retailer sites, anonymous user sessions account for 30-70% of all

sessions •  100% of Bot Sessions are Anonymous

Page 4: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Implement Page Caching?

Improve Performance •  Pages will be served faster to end users •  Decreasing load time and increasing user experience •  Higher Gomez / Keynote industry rankings

Page 5: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Implement Page Caching?

Better Search Engine Ranking Google now places a significant weight on the amount of time a website is required to load when creating their Search Engine Result Pages. Page load time is now a powerful factor in Google's search rankings.

Page 6: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Implement Page Caching?

Page 7: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Implement Page Caching?

Offload of Application and Database Tiers •  Reduce / Control the number of licenses required for application and

database servers •  Focus infrastructure on handling Checkout and Booking •  Handle larger spikes in traffic •  Protect against some DDoS attacks

Page 8: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Why Implement Page Caching?

$$ $$$ $

STATIC

Caching Strategy

Page 9: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching – How it Works

Conditional Akamai examines the incoming cookies / headers to make a decision if the page should be served from cache or sent through to the infrastructure for personalization. The most common use case is to look at the cookies to identify if the user is logged in or has any items in their shopping cart. If both conditions are false, then the page is considered generic and can be served from cache.

Page 10: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching – How it Works

Request for Page Cookies

Serve from Cache

Personalize from server

No

Yes

Page 11: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching – No Cookies

No JSessionID Cookie

Page 12: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching – With Cookies

Page 13: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching - Design Best Practices

Know your Query String Parameters Unless specified, Akamai considers the entire URL as part of the cache key. Knowing what parameters matter will allow us to ignore key value names that would potentially dilute the cache.

Marketing Campaigns

If marketing campaigns need to be tracked at the application, use a defined key value name in the URL that Akamai can use to set a cookie so the campaign can be tracked.

Do NOT Cache Login or Cart pages For PCI reasons and the High Risk of sharing personalized data, this is discouraged.

Page 14: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Conditional Page Caching - Benefits

•  100% Offload of Bot and Search Engine Traffic

•  Ideal New User Experience

•  Improved Gomez and Keynote Statistics

•  Application Can Handle Larger Spikes

Page 15: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – How it Works

Dynamic Akamai examines the incoming cookies / headers and adds them to the cache key. This creates multiple versions of the same page based on a known criteria. The most common use case is to include EdgeScape Data and create variations of the page based on adding Country to the cache key

Page 16: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – How it Works

Request for Page Country

Serve US Version from Cache

Serve FR Version from Cache

US

FR

Page 17: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – Country Variation

No JSessionID Cookie From France

Page 18: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – Variations

Almost any repeatable header value could be used to manipulate the cache key and make multiple variations of a page. •  Number of Items Per Page •  View Type – Gallery | List | Details •  Store ID / Location •  Sort Order •  A / B Testing

Page 19: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – Design Best Practices

Personalization as a Secondary Request If AJAX can be used to make a secondary request, the page can be unconditionally cached and the secondary calls can be conditionally cached

Avoid Items Recently Viewed

This is over personalized and difficult to offload. If it is not done with a secondary request it can make pages potentially un-cacheable

Bread Crumb Navigation

Showing the navigation trail as opposed to the site hierarchy creates nearly unpredictable variations of the page and should be avoided

Page 20: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching – Benefits

•  100% Offload of Bot and Search Engine Traffic

•  Ideal New User & Return Experience

•  Improved Gomez and Keynote Statistics

•  Application Can Handle Larger Spikes

•  Complex Pages Can Be Cached That May Seem Personalized or User Specific

Page 21: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Implementing Dynamic Page Caching

Page 22: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

How to Implement DPC

•  Standard Use Cases •  Enabling caching for anonymous user's and by-passing for logged-in users •  Enabling caching for users with an empty cart and by-passing for users with items in

their cart •  A combination of the two solutions above (Cache anonymous users with an empty

cart, but by-pass logged in users or any kind of user with an item in their cart)

•  To configure DPC, you need to understand •  which pages you want to cache ("content groups") •  under which conditions you want to cache them ("conditions"). •  how you want each {content group, condition} pairing to be cached ("policy")

Page 23: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Choose Optional Features

Page 24: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Enable Dynamic Page Caching

Page 25: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Condition

Page 26: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Condition

Page 27: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Content Group

Page 28: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Content Group

Page 29: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Policy

Page 30: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Policy

Page 31: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Add Policy

Page 32: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

DPC: Review Changes

Page 33: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Deploy changes in Akamai Staging

Page 34: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Tools for Testing

HTTPFox - An HTTP analyzer addon for Firefox https://addons.mozilla.org/en-US/firefox/addon/httpfox/ Modify Headers - Add, modify and filter the HTTP request headers sent to web servers. https://addons.mozilla.org/en-US/firefox/addon/modify-headers/ Cookies Manager+ - View, edit and create new cookies https://addons.mozilla.org/en-US/firefox/addon/cookies-manager-plus/

Page 35: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

Dynamic Page Caching

Q&A

Page 36: ©2012 AKAMAI | FASTER FORWARDTM · ©2012 AKAMAI | FASTER FORWARDTM Conditional Page Caching - Design Best Practices Know your Query String Parameters Unless specified, Akamai considers

©2012 AKAMAI | FASTER FORWARDTM

How it works

Edge App Session Evaluations

•  Click on the agenda icon •  Select the session you are currently attending

•  Click on the surveys tab

•  Click on the session survey made available at the start of your session

•  Complete the session survey

•  Get points for the Akamai Conference Game and win prizes

1 2

3 4