©2012 akamai | faster forwardtm · ©2012 akamai | faster forwardtm conditional page caching -...
TRANSCRIPT
©2012 AKAMAI | FASTER FORWARDTM
Managing Peak Traffic through Dynamic Base Page Caching Solutions
Jessica McPeake William Ackerman Manuel Alvarez
©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
©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
©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.
©2012 AKAMAI | FASTER FORWARDTM
Why Implement Page Caching?
©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
©2012 AKAMAI | FASTER FORWARDTM
Why Implement Page Caching?
$$ $$$ $
STATIC
Caching Strategy
©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.
©2012 AKAMAI | FASTER FORWARDTM
Conditional Page Caching – How it Works
Request for Page Cookies
Serve from Cache
Personalize from server
No
Yes
©2012 AKAMAI | FASTER FORWARDTM
Conditional Page Caching – No Cookies
No JSessionID Cookie
©2012 AKAMAI | FASTER FORWARDTM
Conditional Page Caching – With Cookies
©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.
©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
©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
©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
©2012 AKAMAI | FASTER FORWARDTM
Dynamic Page Caching – Country Variation
No JSessionID Cookie From France
©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
©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
©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
©2012 AKAMAI | FASTER FORWARDTM
Implementing Dynamic Page Caching
©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")
©2012 AKAMAI | FASTER FORWARDTM
Choose Optional Features
©2012 AKAMAI | FASTER FORWARDTM
Enable Dynamic Page Caching
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Condition
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Condition
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Content Group
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Content Group
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Policy
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Policy
©2012 AKAMAI | FASTER FORWARDTM
DPC: Add Policy
©2012 AKAMAI | FASTER FORWARDTM
DPC: Review Changes
©2012 AKAMAI | FASTER FORWARDTM
Deploy changes in Akamai Staging
©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/
©2012 AKAMAI | FASTER FORWARDTM
Dynamic Page Caching
Q&A
©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