spotify's ad targeting infrastructure: achieving real-time personalization for 24 million+...
DESCRIPTION
http://www.hakkalabs.co/articles/spotifys-ad-targeting-infrastructureTRANSCRIPT
![Page 1: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/1.jpg)
May 6th, 2014
Real-Time Personalization with Ad Tech @Spotify
Kinshuk Mishra [email protected] @_kinshukmishra
1
![Page 2: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/2.jpg)
About Me• @Spotify since 2011 • Data and Backend engineering • With the Monetization team
![Page 3: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/3.jpg)
May 12, 2014
Spotify in numbersStarted in 2006, available in 56 markets 20+ million songs, 20,000 added daily 24+ million active users, 6+ million subscribers 1.5 billion playlists
![Page 4: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/4.jpg)
May 12, 2014
Monetization at Spotify• $1 billion paid to rights holders since launch
• 1 in every 4 Spotify users is a paying subscriber
• Ad revenue pays for free tier music streaming
• Build platform to power artist and music label promotions
![Page 5: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/5.jpg)
What is our mission?
• Power the free tier with ads customers love. – Delight users, brands and artists with standout
promotional experiences. – Deliver the right message for every moment.
5
![Page 6: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/6.jpg)
Delight users, brands and artists with standout promotional experience
6
• Ad formats need to be
- Native
- Actionable
- Scalable
- Engaging
![Page 7: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/7.jpg)
7
Spotlight
![Page 8: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/8.jpg)
8
Album promotion
![Page 9: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/9.jpg)
9
Sponsored Genre
![Page 10: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/10.jpg)
10
Sponsored Genre
![Page 11: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/11.jpg)
11
!(Right message for every moment)
![Page 12: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/12.jpg)
Things we had to do
• Make ads context aware.
• Create measurable ad formats.
• Build tools to help brands understand their audience.
• Build flexible targeting infrastructure.
• Analyze user behavior to improve ad relevancy.
12
![Page 13: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/13.jpg)
Why is real time interesting?
• True assessment of the context - current view, last track, etc.
• Immediate feedback - ad clicked, followed a playlist, etc.
• Increased ad opportunities - hyperlocal, current mood, etc.
13
source : http://nativemobile.com/tag/real-time-bidding
![Page 14: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/14.jpg)
How to serve right message for every moment ?
• Fix the WTFs for ads in the music context - Realtime short window activity analysis
• Improve ad relevancy based on user behavior - (Realtime + Batch) long window activity analysis
14
![Page 15: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/15.jpg)
Some quick wins
• Fix the WTFs for ads in the music context - Fix the “Not Safe For Kids” ads problem. - Fix the relevancy of ads in your music session.
• Improve ad relevancy based on user behavior - Fix ad relevancy based on user’s musical taste.
15
![Page 16: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/16.jpg)
Targeting Architecture16
![Page 17: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/17.jpg)
Desired overall design 17
![Page 18: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/18.jpg)
Our requirements
• Scalable log collection • Capability to process logs in batch and realtime mode and aggregate user activity
• Capability to store user profiles and enable serve time lookups
• Ability to update and add new features to existing user profiles
![Page 19: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/19.jpg)
Bigdata @Spotify and choices
• 700 node hadoop cluster • 400 GB service logs daily • 4.5 TB user data daily • 7500 hadoop jobs daily • 64 TB data generated daily • YARN Map-Reduce, Giraph, Storm, Spark, etc.
!
19
![Page 20: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/20.jpg)
Overall design and tech choices20
![Page 21: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/21.jpg)
Source : http://tfosuccess.com/day-106-107-the-storm-arrived/
What is Storm?
• Real time stream processing • Like Hadoop without HDFS • Like Map/Reduce with many reducer steps • Fault tolerant and guaranteed message processing
21
![Page 22: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/22.jpg)
Storm @Spotify
• storm-0.8.0 • 22 node cluster • 15+ topologies • 200k tuples/second • ads, recommendation, analytics, monitoring, etc.
22
source: http://storm.incubator.apache.org/
![Page 23: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/23.jpg)
Use-case
Use real-time session genre information to control
ad serving in real-time
23
![Page 24: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/24.jpg)
Realtime activity analysis • Kafka -> Storm -> Memcached -> Targeting Backend
• Soft realtime
• Easy to scale
24
![Page 25: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/25.jpg)
Getting data25
![Page 26: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/26.jpg)
Getting data across the globe26
![Page 27: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/27.jpg)
Genre Topology27
![Page 28: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/28.jpg)
May 12, 2014
Measuring effectiveness• Build ad quality scores from lower-level metrics
• Positive response, avoidance, etc.
• A/B test hypotheses, evaluate against quality scores
• Build quality score optimization into real-time system
![Page 29: Spotify's Ad Targeting Infrastructure: Achieving Real-time Personalization for 24 million+ Users - Kinshuk Mishra](https://reader034.vdocuments.mx/reader034/viewer/2022042714/554f454db4c905423f8b489a/html5/thumbnails/29.jpg)
May 6th, 2014
Want to join the band?https://www.spotify.com/us/jobs/ or https://twitter.com/Spotifyjobs !
Kinshuk Mishra [email protected] @_kinshukmishra