evolution of spotify's ad architecture (qcon 2016 shanghai)

38
Evolution of Spotify’s Ads Architecture A case study on evolving complex systems Email : [email protected] Twitter : @_kinshukmishra

Upload: kinshuk-mishra

Post on 16-Apr-2017

118 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Evolution of Spotify’s Ads ArchitectureA case study on evolving complex systems

Email : [email protected] : @_kinshukmishra

Page 2: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 3: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 4: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Ad

Page 5: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 6: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 7: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 8: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)
Page 9: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Why did Spotify evolve Ads architecture?

Page 10: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Our new needs●

● Change in scale

● Emergence of new client platforms

● Cheap computing

● New ways to create demand

● New features to meet business objectives

Page 11: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Context of Spotify’s Ads scale and challenges

● 70+ million MAU free users

● 60 countries

● 10+ billion ad impressions per month

● 10 ad formats over 3 media types (audio, video, display)

● Multi-platform (mobile, desktop, TVs, web)

Page 12: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

2013 2014 2015 2016 2017

Ad server replacementTargeting & User

ModelingDMP audience augmentation

Self-serve & Creative generation

Ad optimizationsMove to GCPAd ExchangesMulti platform client

Evolution timeline

Page 13: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Circa 2013

Proxy ServiceDesktop

LogDelivery HDFS

User Profile

Batch

Basic Ad Server

CampaignManagement

Billing/Reporting

Page 14: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Ad server design flaws Proxy Service

Desktop Routerhash(userid)

Ad server ring with partitions

Ad server instance

Page 15: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

During the ad server transition

Proxy ServiceDesktop

LogDelivery HDFS

User Profile

Batch

Smart Ad Server

CampaignManagement

Billing/Reporting

Ad Server Proxy

(routing) Basic Ad Server

Gradual transition from basic to smart ad serving

Page 16: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

After the ad server transition

Proxy ServiceDesktop

LogDelivery HDFS

User Profile

Batch

CampaignManagement

Billing/Reporting

Smart Ad Server

Page 17: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Division of responsibilities

Desktop iOS

Android

Ads SDK

Desktop

Web

Rendering Ad trigger decisioning

Ads Ranking

Ads Caching

Ad batching & fetch communication

Ad decisioning

Ad fetch orchestration

Client context

Ad Trigger & Render

Before After

Page 18: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Multi platform client design

iOS

Proxy Service

Android

Ads SDK

Desktop

Web

LogDelivery HDFS

User Profile

Batch

CampaignManagement

Billing/Reporting

Smart Ad Server

Page 19: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Targeting & User Modeling

iOS

Android

Ads SDK

Desktop

Web

Proxy Service

LogDelivery HDFS

User Profile

Targeting Service

Stream Batch

Smart Ad Server

CampaignManagement

Billing/Reporting

Page 20: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Ad Exchange Integration

iOS

Android

Ads SDK

Desktop

Web

Proxy Service

LogDelivery HDFS

User Profile

Targeting Service

Stream Batch

CampaignManagement

Billing/Reporting

Ad Server

Decision Delivery

Ad Server

Ad Exchanges

Page 21: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

DMP audience augmentation

Modeling

DMPiOS

Android

Ads SDK

Desktop

Web

Proxy Service

LogDelivery HDFS

User Profile

Targeting Service

Stream Batch

CampaignManagement

Billing/Reporting

Ad Server

Decision Delivery

Ad Server

Ad Exchanges

Page 22: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Move to Google Cloud Platform

Modeling

DMPiOS

Android

Ads SDK

Desktop

Web

Proxy Service

LogDelivery GCS

User Profile

Targeting Service

Stream Batch

CampaignManagement

Billing/Reporting

Ad Server

Decision Delivery

Ad Server

Ad Exchanges

Page 23: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Self-serve and Creative generation

iOS

Proxy Service

Android

Ads SDK

Desktop

Web

Chromecast/Playstation/

FireTV

Ad Aggregation

Service

LogDelivery GCS

User Profile

Targeting Service

DMP

Stream Batch

Ad Server

Decision Delivery Ad Exchanges

CampaignManagement

Modeling Self-Serve Service

Creative Generation Payments

Billing/Reporting

Page 24: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Client got even thinner

iOS

Proxy Service

Android

Ads SDK

Desktop

Web

Chromecast/Playstation/

FireTV

Ad Aggregation

Service

LogDelivery GCS

User Profile

Targeting Service

DMP

Stream Batch

Ad Server

Decision Delivery Ad Exchanges

CampaignManagement

ModelingSelf-Serve Service

Creative Generation Payments

Billing/Reporting

Page 25: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Ad Optimizations

iOS

Proxy Service

Android

Ads SDK

Desktop

Web

Chromecast/Playstation/

FireTV

Ad Aggregation

Service

LogDelivery GCS

User Profile

Targeting Service

DMP

Stream Batch

Ad Server

Decision Delivery Ad Exchanges

CampaignManagement

Optimization

ModelingSelf-Serve Service

Creative Generation Payments

Billing/Reporting

Page 26: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Connecting all the dots ...

Page 27: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Then

Proxy ServiceDesktop

LogDelivery HDFS

User Profile

Batch

Ad Server

Decision Delivery

CampaignManagement

Billing/Reporting

Page 28: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Now

iOS

Proxy Service

Android

Ads SDK

Desktop

Web

Chromecast/Playstation/

FireTV

Ad Aggregation

Service

LogDelivery GCS

User Profile

Targeting Service

DMP

Stream Batch

Ad Server

Decision Delivery Ad Exchanges

CampaignManagement

Optimization

ModelingSelf-Serve Service

Creative Generation Payments

Billing/Reporting

Page 29: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

War stories and lessons learnt

Page 30: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Design your systems to be master of one thing

Page 31: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Remember division of responsibilities?

Desktop iOS

Android

Ads SDK

Desktop

Web

Rendering Ad trigger decisioning

Ads Ranking

Ads Caching

Ad batching & fetch communication

Ad decisioning

Ad fetch orchestration

Client context

Ad Trigger & Render

BAD GOOD

Page 32: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Appends are easier than updates

Page 33: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Remember that time?

iOS

Android

Ads SDK

Desktop

Web

Proxy Service

LogDelivery HDFS

User Profile

Targeting Service

Stream Batch

Smart Ad Server

CampaignManagement

Billing/Reporting

Page 34: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

The 100:10:1 rule

Page 35: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Agile is your friend

Page 36: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Test with minimal blast radius

Page 37: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Things will always go wrong!

Page 38: Evolution of Spotify's ad architecture (Qcon 2016 Shanghai)

Thank You!

Email : [email protected] : @_kinshukmishra