the impact of ads on performance and improving perceived performance

38
The Impact of Ads on Performance and Improving Perceived Performance Julia Lee, Sr. Dir. of Engineering, Yahoo! Mail Yahoo!, Inc. October 2011

Upload: candy

Post on 06-Feb-2016

37 views

Category:

Documents


0 download

DESCRIPTION

The Impact of Ads on Performance and Improving Perceived Performance. Julia Lee, Sr. Dir. of Engineering, Yahoo! Mail Yahoo!, Inc. October 2011. Yahoo! Mail #1 in US 289MM unique users 1.9B pageviews/day Yahoo! Mail just went GA with new product 2x faster New ad implementation - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Impact of Ads on Performance and  Improving Perceived Performance

The Impact of Ads on Performance and

Improving Perceived Performance

Julia Lee, Sr. Dir. of Engineering, Yahoo! MailYahoo!, Inc.

October 2011

Page 2: The Impact of Ads on Performance and  Improving Perceived Performance

Yahoo! Mail #1 in US289MM unique users1.9B pageviews/dayYahoo! Mail just went GA with new product- 2x faster- New ad implementation

13B ad impressions/day

Fast facts

My goal today

Tell you about our ads journeyShare some broad strategies to try

Page 3: The Impact of Ads on Performance and  Improving Perceived Performance

Definitions

Display Advertising – Not Search Advertising

Ad creative – Markup, images, assets, JS/CSS to show the ad

Ad decisioning time – Time to decide which ad to show the user

Ad serving time – Time to download the ad assets over network

Ad rendering time – Time to render the ad, including animation

Page 4: The Impact of Ads on Performance and  Improving Perceived Performance

Timeline

Page 5: The Impact of Ads on Performance and  Improving Perceived Performance

0

500

1000

1500

2000

2500

3000

3500

4000

398328003  398328009 398328139

Page

Tim

e (

ms)

Text

Graphical

Text vs. Graphical Impact

Page 6: The Impact of Ads on Performance and  Improving Perceived Performance

Overall latency breakdown

73% latency

Due to ads

27% latency

Application

Page 7: The Impact of Ads on Performance and  Improving Perceived Performance

What changed?Display

AdvertisingLandscape

Page 8: The Impact of Ads on Performance and  Improving Perceived Performance

Ad Marketplace + Ecosystem (~2006)

Supply(publishers)

Ad Networks

Demand(advertisers)

Ad Server

Y! O&O

Ad Ad Ad Ad AdAd Ad

AdNet

Ad

Page 9: The Impact of Ads on Performance and  Improving Perceived Performance

Ad Marketplace + Ecosystem (~2009)

Supply(publishers)

Exchanges

Ad Networks

Demand(advertisers)

Ad Server

Y! Network

Right Media

AdNet

AdNet

Ad Net

AdNet

AdNet

DCLK

Y! O&O NPC Comcast eBay

Ad Ad Ad Ad AdAd Ad

Page 10: The Impact of Ads on Performance and  Improving Perceived Performance

It’s complicated Richer targeting:

relevant is fast!

Inventory forecast

Pricing optimization

Local

Deals

Coupons

Page 11: The Impact of Ads on Performance and  Improving Perceived Performance

Ad creative/tags

Ad call sequenceApplicationClient Ad networkAd server Ad exchange Ad content hosting

HTTP request

Async ad call

Page content

Ad creative/tags

Ad request to ad network

Ad request to 3rd party

Ad creative

Ad creative request

Ad creative/tags

Ad infinitum…

Ad infinitum…

Server side

Client side

Page 12: The Impact of Ads on Performance and  Improving Perceived Performance

What next?Measure and monitor

Page 13: The Impact of Ads on Performance and  Improving Perceived Performance

Monitoring ad positions Many different profiles/positions Campaigns change Latency transient What should alert threshold be? What triggered the alert?

Page 14: The Impact of Ads on Performance and  Improving Perceived Performance

Vendor Ad Latency Monitoring

X Axis: Vendors Y Axis: Avg P95 Time(in ms), sorted on Avg Median TimeTime periods below are rolling windows (e.g. Year-to-Date = 2/24/09

through 2/23/10)

Page 15: The Impact of Ads on Performance and  Improving Perceived Performance

Monitoring Challenges

What is representative? Is it repeatable? What is actually slow? Decisioning? Serving? Network? Identifying ads == finding needle in a haystack Is this the right level of granularity? How to engage with a vendor?

Page 16: The Impact of Ads on Performance and  Improving Perceived Performance

Global challenges

Are ads locally decided? Are ads geo-targeted? What is the right user experience? Is the ad serving footprint global? Where is the bottleneck?

Page 17: The Impact of Ads on Performance and  Improving Perceived Performance

Ad defensive strategies

Page 18: The Impact of Ads on Performance and  Improving Perceived Performance

1. Sandbox ad content (HTML, JavaScript, etc.) in an IFrame

2. Host IFrame on a cross-domain different from publisher

3. Implement an API for richer functionality for use by publishers/vendors can use (rollovers, expanding)

4. Use cross-domain messaging to communicate between application and ad

Better security Better stability Faster performance Richer ad capabilities Allows metrics gathering More control

Strategy #1: Ad handling library

Benefits

Page 19: The Impact of Ads on Performance and  Improving Perceived Performance

Strategy #2: Control server vs. client side ad requests

Combine ad requests with other requests Leverage AJAX techniques Delay ad loading to avoid browser contention Strategy differs based on point in session User perception can vary with techniques

Page 20: The Impact of Ads on Performance and  Improving Perceived Performance

Web1.0 Ad Flow

• Application server fetches and inserts ad into main page

• Synchronous/blocked loading

• Direct DOM access

• Cannot differentiate ad content from main content

• Best perceived user experience for premium ads in prominent positions

Web Browser

Application Server fetches applicationand ad content

HTML processed

Page rendered

User may now interact with page

Page 21: The Impact of Ads on Performance and  Improving Perceived Performance

Web1.0/2.0 Client-side Ad Flow

• Fetch ad after application has loaded

• Fine grained ad-rotation in Web2.0/AJAX pages

• Prioritizes user actions first

• Requires extra roundtrip

Client fetches and inserts ad content

Web Browser

Application Server fetches applicationcontent only

HTML processed

Page rendered

User may now interact with page

Page 22: The Impact of Ads on Performance and  Improving Perceived Performance

Web2.0 Ad Flow

• Client runtime ad strategy

• AD content is simply data

• AD content render occurs after initial page load/render

• Prioritizes user actions first

• Saves one roundtrip for client side ad fetch

Web Browser

Application Server fetches applicationand ad content

AD HTML transformed into data, emitted with page content

Page HTML processed (ADs not rendered)

Page rendered

JS process AD DATA, and emits sandbox

ADs rendered

User may interact with page

Page 23: The Impact of Ads on Performance and  Improving Perceived Performance

Strategy #3: Double buffering

1. Requires ad handling library to hook into events

2. Requires same ad position in same web2.0 “page view” to work

3. Load first ad into iframe

4. Load second ad into iframe underneath first iframe

5. When second ad is loaded, destroy the first iframe

6. Ad underneath gets shown, promote the second iframe z-index

Page 24: The Impact of Ads on Performance and  Improving Perceived Performance

Strategy #4: Control client execution and ad rotation1. Think in terms of order of execution

2. Complete all application rendering before fetching next ad

3. Requires double buffering to mask browser execution

Page 25: The Impact of Ads on Performance and  Improving Perceived Performance

Example – Message Read Flow Attempt #1

*Old AD still visible until new one arrives

Mail Inbox

Message Read

Fetch Message

Fetch AD ContentProcess Message

Message Rendered

Process AD Content

AD Rendered

Page 26: The Impact of Ads on Performance and  Improving Perceived Performance

Example – Message Read Flow Attempt #2

*Old AD still visible until new one arrives

Mail Inbox

Message Read

Fetch Message

Fetch AD ContentProcess Message

Message Rendered

Process AD Content

AD Rendered

Page 27: The Impact of Ads on Performance and  Improving Perceived Performance

Example – Message Read Flow Attempt #3

*Old AD still visible until new one arrives

Mail Inbox

Message Read

Fetch Message

Fetch AD ContentProcess Message

Message Rendered

Process AD Content

AD Rendered

Page 28: The Impact of Ads on Performance and  Improving Perceived Performance

Demo

Page 29: The Impact of Ads on Performance and  Improving Perceived Performance

Summary

Display advertising landscape is complex Measuring and monitoring ad performance is subtle Exercise defensive strategies to mitigate ad impact End user experience is qualitative

Page 30: The Impact of Ads on Performance and  Improving Perceived Performance

Thank you!

Questions?

Page 31: The Impact of Ads on Performance and  Improving Perceived Performance

Appendix

Page 32: The Impact of Ads on Performance and  Improving Perceived Performance

Web1.0 vs. Web2.0 Ad Impact

73% faster

37% faster

With Ads

With Ads

Without Ads

Without Ads

Page 33: The Impact of Ads on Performance and  Improving Perceived Performance

Old ad flow

No redirection Premium ads

Application ServerAd ServerCDN

Latency Total:

100 ms

2 ms

10 ms

100 ms

100 ms

50 ms

~464 ms

100 ms

2 ms

Page 34: The Impact of Ads on Performance and  Improving Perceived Performance

New ad flow

Application ServerAd ServerAd Exchange 1

Ad Exchange 2

CDN

Latency Total:

100 ms

2 ms

10 ms

100 ms300 ms

100 ms

~2214 ms

300 ms

300 ms

50 ms

300 ms

100 ms

150 ms

300 ms

2 ms

Multiple ad redirectionHighest bidderMost relevance

Page 35: The Impact of Ads on Performance and  Improving Perceived Performance

Sandbox library resources

• 2 ms or less of server time added to transform AD into DATA

• Adds 2 client-side HTTP requests at most

• 1 JavaScript file to build sandbox and receive calls from vendors

• 1 HTML file for the sandbox

• Typically makes 0 HTTP requests, as both JavaScript, and HTML files are cacheable

• Typically less than 50 ms of run time, client side impact in browser, due to best practices in JavaScript

Page 36: The Impact of Ads on Performance and  Improving Perceived Performance

AD HTML as DATA

<SCRIPT type="text/plain" _pos="LREC" _en="ISO-8859-1"><!-- Other meta-data attributes may be added -->

"<IFRAME SRC=\"http://ad.doubleclick.net/adi/N4912.153730.YAHOO.COM/B5177000.11; . . . \“ />” <!-- Original AD HTML above, JS safe string -->

</SCRIPT>

• Original AD HTML is transformed into new HTML

• Is a “data-island”• Not executed / rendered by browser

Page 37: The Impact of Ads on Performance and  Improving Perceived Performance

Metrics gathering• Ad library can be configured with a variety of “callback” functions

DARLA_CONFIG = { /* . . . Other config options here . . . */

onStartPosRender: function() { /* Log the time of an AD starting render process */ },

onFinishPosRender: function() { /* Log when an AD has finished rendering */ }}

• This level of detail was not available without library

• Allows properties to decide what info is important

Page 38: The Impact of Ads on Performance and  Improving Perceived Performance

Metrics gathering

• Such as an AD taking too long to be rendered

• JavaScript Errors found in ADs

• Or to track and report “bad” ADs

• Properties like Yahoo! Mail implement these callbacks to collect their own statistics

• AD Request Time

• AD Render Time

• Other data relevant to rendering• Was JavaScript used• Were IFRAMEs used• Was the EAS used• etc