SlideShare a Scribd company logo
MongoDB
@
Viacom
1
(or how to support a few million kids sliming their favorite celebrities all at once.)
Who Are We?
Michael Makunas
Director - Multiplatform Engineering
@mmakunas
Ramesh Nuthalapati
Architect - Multiplatform Engineering
@nuthalapati
2
Who Are We?
Viacom Media Networks
Viacom creates original entertainment content for every
audience, on every screen around the world. The company's
brands strive for creative excellence and cultural impact across
programming, motion pictures and digital experiences that live
online, on mobile, and via apps.
3
Today We Are Talking
About...
Funnel
Viacom’s internal high volume polling, voting, and data
collection service.
4
…and How MongoDB just
works.
5
• Launched in 2011 on 2.0
• Currently on 2.4
Use Cases
Award Show Voting
•MTV Video Music Awards (VMAs)
•European Movie Awards (EMAs)
•Kids Choice Awards (KCAs)
•CMT Music Awards
Polling
•MTV March Musical Madness
•Spike Bellator On Air Match Voting
Contests
•MTV Ultimate Fan Experience
6
What is “High Volume” to
Viacom?
•From big to little, continuous “horizontal” support across
100+ global sites
•Voting, polling, and data collection occurs 24/7
•No “maintenance windows”
•Sudden spikes to 15K+ votes per second from on-air
“Throws” during prime time viewing: “Go to the site and
Vote Now!”
•Storage of 100s of millions of votes for analysis after events
7
A Very Important
Question...
8
Who will survive
the Human Slime
Car Wash!?!?!?
9
Statistics (Pushing The Limit)
2015 Kids Choice Awards
•531 Million votes (a new record!)
•7 Million votes during the show
10
Some Definitions
Funnel
•Our internal name for our system
Site
•A brand and/or site specific namespace for collecting data
Tent-pole
•A major programming (entertainment) event
Collection
•An individual poll, voting event, sweepstakes, etc.
•NOT a MongoDB Collection
Entry
•A single vote or poll entry
Processor
•Performs an action on a entry (validate it, persists it, etc.)
11
History
•Why did we build Funnel?
•Why did we choose Mongo?
12
Why Did We Build It?
•Previous systems unmanageable
•One system for data collection
•Contests, sweepstakes, small polls
•Built in-house with ATG Dynamo and MySQL
•Per-site deployment model meant multiple installations per
brand
•Flexible schema == MySql “xml blobs”
•Separate system for high volume polling
•Comercial
•Lack of customization
•Per-brand installation
13
Why Did We Choose
Mongo?
•Flexible schema document style database provides the
quick-to-market support needed by 100+ sites, brands, and
countries (All who want things “just a little bit different”)
•Proven scalability
•JSON in and JSON out
14
Architectural Goals
• High write throughput over read throughput and
consistency
• Handle up to 10,000 1KB writes per second. Read
throughput is secondary
• High Availability
• Replace dozens of separate installations and services
• Wide adoption across internal brands
15
Server Layout
16
Primary
Secondary
Secondary
Replica Set 1
(day-to-day use)
Replica Set 2
(tent-pole events)
Primary
Secondary
Secondary
Server Layout
• High availability
• Primary, Secondary configuration with automatic
failover
• Primary stores all reads and writes, secondary stays in-
sync with Primary
• Monitoring with MongoDB Management Service (MMS)
• Email Alerts from MMS for high volume op inserts
17
More on MMS
18
KCA 2015 MMS Graph
Funnel UI
Schema For a Typical
Collection
"_id" : "kca-live-vote-2015-event",
"_class" : "com.mtvi.funnel.domain.model.collection.Collection",
"site" : "kca.nick.com",
"name" : "kca-live-vote-2015-event",
"description" : "KCA Live Event",
"owner" : "nuthalar",
"start" : ISODate("2015-03-02T05:00:00Z"),
"end" : ISODate("2015-05-10T04:00:00Z"),
"createdDate" : ISODate("2015-03-03T17:34:55.113Z"),
"lastUpdateDate" : ISODate("2015-03-26T14:40:15.665Z"),
"tags" : ["live-show"],
"processorChain" : [...],
“questions” : [...] -- Questions has Options and Validators
20
Processors
• Each entry received by Funnel will be handled by an ordered list of
processors (the ProcessorChain) As each processor in the list is visited, the
processor will decide whether to continue to the next one or to terminate
further processing
• A Processor can raise an error, and its detail message will be configurable
and localizable. When an error is raised, it can signal the system to take a
few different actions depending on the severity of the error condition:
Log the error but continue to processing
Bubble up the error to the client and cease further processing
Ignore the error, cease further processing, and return an OK response
to the client
21
Processors (UI)
22
Questions: Email
23
Questions: Email
{
"name":"email",
"displayText":"email",
"persistable":true,
"source":"ENTITY_BODY",
"validators":[
{
"enabled":true,
"failureMessage":"Please enter a valid email address to proceed.",
"contentType":"EmailAddressValidator",
"_class":"com.mtvi.funnel.domain.model.collection.questions.validators.E
mailAddressValidator"
},
{
"enabled":true,
"failureMessage":"This field is required. Please enter a response to proceed.",
"contentType":"RequiredValidator",
"_class":"com.mtvi.funnel.domain.model.collection.questions.validators.RequiredValidator"
}
],
"seqNum":NumberLong(0),
"tallyEnabled":false,
"isMandatory":false,
"contentType":"EmailQuestion"
}
24
Questions: Single Choice
25
Questions: Single Choice
26
{
"multipleAnswers":false,
"options":[
{
"optionValue":"andrew-garfield-male-action-star",
"displayText":"andrew-garfield-male-action-star",
"customOption":false
},
{
"optionValue":"channing-tatum-male-action-
star",
"displayText":"channing-tatum-male-action-
star",
"customOption":false
},
{
"optionValue":"chris-evans-male-action-
star",
"displayText":"chris-evans-male-action-
star",
"customOption":false
},
{
"optionValue":"chris-pratt-male-action-star",
"displayText":"chris-pratt-male-action-star",
"customOption":false
},
],
"writeInOptionEnabled":false,
"name":"favorite-male-action-star",
"displayText":"favorite-male-action-star",
"persistable":true,
"source":"ENTITY_BODY",
"validators":[
{
"enabled":false,
"failureMessage":"This field is required. Please enter a
response to proceed.",
"contentType":"RequiredValidator",
"_class":"com.mtvi.funnel.domain.model.collection.questions.validators.R
equiredValidator"
},
{
"enabled":true,
"failureMessage":"Please select a valid choice to proceed.",
"contentType":"ChoiceValidator",
"_class":"com.mtvi.funnel.domain.model.collection.questions.validators.C
hoiceValidator"
},
{
"enabled":true,
"failureMessage":"Please fill in the 'Other' value to
proceed.",
"contentType":"WriteInRequiredValidator",
"_class":"com.mtvi.funnel.domain.model.collection.questions.validators.W
riteInRequiredValidator"
}
],
"seqNum":NumberLong(0),
"tallyEnabled":true,
"isMandatory":false,
"sm4MappingEnabled":false,
"sm4Mapping":"",
"exodusMapping":"",
"contentType":"SingleChoiceQuestion",
"_class":"com.mtvi.funnel.domain.model.collection.questions.QuestionWith
Options"
}
An Entry would look like…
27
{
"_id" : ObjectId("53c698c1ebd268ff9b76034d"),
"answers" : {
"question" : "option-3",
"source" : "mobile",
"True-Client-IP" : "166.77.6.8"
},
"createdDate" : ISODate("2014-07-16T15:22:41.593Z")
}
Entry Trend Graph
28
A Tally would look like…
29
{
"_id" : ObjectId("53c698c51180cc552e79c12d"),
"option-1" : 1249596,
"option-2" : 341404,
"option-3" : 466646,
"questionName" : "question",
"timeWindowType" : "ALL_TIME"
}
Optimizations
We didn’t get it perfect the first time:
• Correct Indices - Index on created Date of Entry Collection.
EnsureIndex is called during collection creation and
update
• Batch update of vote tallies - Update the count per second
instead of per Entry
• Hourly Stats – Pre-caluculating hourly totals saved resources
during live events to get stats for past 24 hours, 7 days and
30 days
30
SPAM Prevention
•De-duplicator processor: De-duplicates X number of
entries for a defined period (eg. 30 Entries per minute).
Internal to Funnel application
•VERISIGN DDoS Protection service
•Akamai WAF (part of Kona Web Application Firewall)
•CAPTCHA
•Authentication (FLUX - Viacom Internal System)
31
Before & After
Previous Systems
•Decentralized
•Multiple Installations
•Outdated App Server
•Rigid Schema requiring
rigid change control
process
32
Funnel
•Service Oriented
•Performant
•Flexible Schema; easily
extended
Our Track Record
•100+ Sites
•15K Collections
•10+ Billion Votes to date
33
Where else MongoDB is
Used @ Viacom
•Used in production since v 1.6
•Content Management System
•Viacom Identity Platform (Auth & User Profiles)
34
Wait…
35
Who survived the
Human Slime
Carwash!?!?!?
36
Questions ?
37
Thank You!
38
• Michael Makunas -- @mmakunas
• Ramesh Nuthalapati -- @nuthalapati

More Related Content

PPTX
Mobility: It's Time to Be Available for HER
MongoDB
 
PPTX
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB
 
PPTX
E-Commerce and MongoDB at Backcountry.com
MongoDB
 
PPTX
App Sharding to Autosharding at Sailthru
MongoDB
 
PPTX
Moving Hudl from MS SQL to MongoDB: A Two Year Journey
MongoDB
 
PPTX
Webinar: Realizing Omni-Channel Retailing with MongoDB - One Step at a Time
MongoDB
 
PPTX
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
MongoDB
 
PPTX
Calculating ROI with Innovative eCommerce Platforms
MongoDB
 
Mobility: It's Time to Be Available for HER
MongoDB
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB
 
E-Commerce and MongoDB at Backcountry.com
MongoDB
 
App Sharding to Autosharding at Sailthru
MongoDB
 
Moving Hudl from MS SQL to MongoDB: A Two Year Journey
MongoDB
 
Webinar: Realizing Omni-Channel Retailing with MongoDB - One Step at a Time
MongoDB
 
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
MongoDB
 
Calculating ROI with Innovative eCommerce Platforms
MongoDB
 

What's hot (20)

PPTX
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB
 
PDF
Business Track: How MongoDB Helps Telefonia Digital Accelerate Time to Market
MongoDB
 
PDF
Building LinkedIn's Learning Platform with MongoDB
MongoDB
 
PPTX
Bye Bye Legacy: Simplifying the Journey
MongoDB
 
PDF
Overcoming Today's Data Challenges with MongoDB
MongoDB
 
PPTX
Webinar: Simplifying the Database Experience with MongoDB Atlas
MongoDB
 
PPTX
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
MongoDB
 
PPTX
How to deliver a Single View in Financial Services
MongoDB
 
PPTX
Dataweek-Talk-2014
ardan-bkennedy
 
PPTX
Webinar: MongoDB and Analytics: Building Solutions with the MongoDB BI Connector
MongoDB
 
PPTX
MongoDB in a Mainframe World
MongoDB
 
PPTX
How leading financial services organisations are winning with tech
MongoDB
 
PPTX
MongoDB Atlas
MongoDB
 
PDF
Final_CloudEventFrankfurt2017 (1).pdf
MongoDB
 
PPTX
Unlocking Operational Intelligence from the Data Lake
MongoDB
 
PPTX
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
PPTX
Power Real Estate Property Analytics with MongoDB + Spark
MongoDB
 
PDF
How Verizon Uses Disruptive Developments for Organized Progress
MongoDB
 
PPT
MongoDB in the Healthcare Enterprise
MongoDB
 
PDF
MongoDB Europe 2016 - Choosing Between 100 Billion Travel Options – Instant S...
MongoDB
 
MongoDB and Our Journey from Old, Slow and Monolithic to Fast and Agile Micro...
MongoDB
 
Business Track: How MongoDB Helps Telefonia Digital Accelerate Time to Market
MongoDB
 
Building LinkedIn's Learning Platform with MongoDB
MongoDB
 
Bye Bye Legacy: Simplifying the Journey
MongoDB
 
Overcoming Today's Data Challenges with MongoDB
MongoDB
 
Webinar: Simplifying the Database Experience with MongoDB Atlas
MongoDB
 
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
MongoDB
 
How to deliver a Single View in Financial Services
MongoDB
 
Dataweek-Talk-2014
ardan-bkennedy
 
Webinar: MongoDB and Analytics: Building Solutions with the MongoDB BI Connector
MongoDB
 
MongoDB in a Mainframe World
MongoDB
 
How leading financial services organisations are winning with tech
MongoDB
 
MongoDB Atlas
MongoDB
 
Final_CloudEventFrankfurt2017 (1).pdf
MongoDB
 
Unlocking Operational Intelligence from the Data Lake
MongoDB
 
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
Power Real Estate Property Analytics with MongoDB + Spark
MongoDB
 
How Verizon Uses Disruptive Developments for Organized Progress
MongoDB
 
MongoDB in the Healthcare Enterprise
MongoDB
 
MongoDB Europe 2016 - Choosing Between 100 Billion Travel Options – Instant S...
MongoDB
 
Ad

Viewers also liked (17)

PPT
AT&T’s Mobile Developer Community: Social, Personalized, and Built for Scale ...
MongoDB
 
PPTX
Victors & Spoils at DIS: Rethinking the Agency Model
Digiday
 
PPTX
Viacom
michellejphilippe
 
PPTX
EBAY_VIACOM_UPFRONT.pptm
Suhail Mahajan
 
PPTX
Viacom culture
Anthony Rowe
 
PPTX
MongoDB in Denver: How Global Healthcare Exchange is Using MongoDB
MongoDB
 
PPTX
Mongo DB in gaming industry
Dmitry Makarchuk
 
PPTX
Michael Poremba, Director, Data Architecture at Practice Fusion
MongoDB
 
PDF
Building Real Time Systems on MongoDB Using the Oplog at Stripe
MongoDB
 
PDF
The Age of Distraction at VIACOM Identify
InSites on Stage
 
PPTX
MongoDB San Francisco 2013:Geo Searches for Healthcare Pricing Data presented...
MongoDB
 
PPTX
Solving the Disconnected Data Problem in Healthcare Using MongoDB
MongoDB
 
PPTX
MongoDB at Medtronic
MongoDB
 
PDF
LinkedIn Data Infrastructure Slides (Version 2)
Sid Anand
 
PPTX
Starting from Scratch with the MEAN Stack
MongoDB
 
PDF
MongoDB Case Study in Healthcare
MongoDB
 
ODP
CBGTBT - Part 1 - Workshop introduction & primer
Blockstrap.com
 
AT&T’s Mobile Developer Community: Social, Personalized, and Built for Scale ...
MongoDB
 
Victors & Spoils at DIS: Rethinking the Agency Model
Digiday
 
EBAY_VIACOM_UPFRONT.pptm
Suhail Mahajan
 
Viacom culture
Anthony Rowe
 
MongoDB in Denver: How Global Healthcare Exchange is Using MongoDB
MongoDB
 
Mongo DB in gaming industry
Dmitry Makarchuk
 
Michael Poremba, Director, Data Architecture at Practice Fusion
MongoDB
 
Building Real Time Systems on MongoDB Using the Oplog at Stripe
MongoDB
 
The Age of Distraction at VIACOM Identify
InSites on Stage
 
MongoDB San Francisco 2013:Geo Searches for Healthcare Pricing Data presented...
MongoDB
 
Solving the Disconnected Data Problem in Healthcare Using MongoDB
MongoDB
 
MongoDB at Medtronic
MongoDB
 
LinkedIn Data Infrastructure Slides (Version 2)
Sid Anand
 
Starting from Scratch with the MEAN Stack
MongoDB
 
MongoDB Case Study in Healthcare
MongoDB
 
CBGTBT - Part 1 - Workshop introduction & primer
Blockstrap.com
 
Ad

Similar to MongoDB @ Viacom (20)

PPTX
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
MongoDB
 
PDF
MongoDB for Oracle Experts - OUGF Harmony 2014
Henrik Ingo
 
PPTX
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
PPTX
A Groovy Way to Interface With Cascade Server
hannonhill
 
PDF
Designing your API Server for mobile apps
Mugunth Kumar
 
PPTX
Benefits of Using MongoDB Over RDBMSs
MongoDB
 
PDF
Enabling Telco to Build and Run Modern Applications
Tugdual Grall
 
PPTX
Best Practices for MongoDB in Today's Telecommunications Market
MongoDB
 
KEY
mongoDB at Visibiz
Mike Brocious
 
PPTX
EMusic - Presentation
Quang Nguyen
 
PPTX
MongoDB Partner Program Update - November 2013
MongoDB
 
PPT
A Morning with MongoDB - Helsinki
MongoDB
 
PPTX
Reducing Development Time with MongoDB vs. SQL
MongoDB
 
PPTX
Migrating MVVM Applications to HTML5
Chris Bannon
 
PPTX
Transitioning from SQL to MongoDB
MongoDB
 
PDF
MongoDB in the Big Data Landscape
MongoDB
 
PPT
Welcome and Introduction to A Morning with MongoDB Petah Tikvah
MongoDB
 
PPTX
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
MongoDB
 
PPTX
3 things your app API is doing WRONG
Robert MacLean
 
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
MongoDB
 
MongoDB for Oracle Experts - OUGF Harmony 2014
Henrik Ingo
 
Database Trends for Modern Applications: Why the Database You Choose Matters
MongoDB
 
A Groovy Way to Interface With Cascade Server
hannonhill
 
Designing your API Server for mobile apps
Mugunth Kumar
 
Benefits of Using MongoDB Over RDBMSs
MongoDB
 
Enabling Telco to Build and Run Modern Applications
Tugdual Grall
 
Best Practices for MongoDB in Today's Telecommunications Market
MongoDB
 
mongoDB at Visibiz
Mike Brocious
 
EMusic - Presentation
Quang Nguyen
 
MongoDB Partner Program Update - November 2013
MongoDB
 
A Morning with MongoDB - Helsinki
MongoDB
 
Reducing Development Time with MongoDB vs. SQL
MongoDB
 
Migrating MVVM Applications to HTML5
Chris Bannon
 
Transitioning from SQL to MongoDB
MongoDB
 
MongoDB in the Big Data Landscape
MongoDB
 
Welcome and Introduction to A Morning with MongoDB Petah Tikvah
MongoDB
 
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
MongoDB
 
3 things your app API is doing WRONG
Robert MacLean
 

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 

Recently uploaded (20)

PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Doc9.....................................
SofiaCollazos
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 

MongoDB @ Viacom

  • 1. MongoDB @ Viacom 1 (or how to support a few million kids sliming their favorite celebrities all at once.)
  • 2. Who Are We? Michael Makunas Director - Multiplatform Engineering @mmakunas Ramesh Nuthalapati Architect - Multiplatform Engineering @nuthalapati 2
  • 3. Who Are We? Viacom Media Networks Viacom creates original entertainment content for every audience, on every screen around the world. The company's brands strive for creative excellence and cultural impact across programming, motion pictures and digital experiences that live online, on mobile, and via apps. 3
  • 4. Today We Are Talking About... Funnel Viacom’s internal high volume polling, voting, and data collection service. 4
  • 5. …and How MongoDB just works. 5 • Launched in 2011 on 2.0 • Currently on 2.4
  • 6. Use Cases Award Show Voting •MTV Video Music Awards (VMAs) •European Movie Awards (EMAs) •Kids Choice Awards (KCAs) •CMT Music Awards Polling •MTV March Musical Madness •Spike Bellator On Air Match Voting Contests •MTV Ultimate Fan Experience 6
  • 7. What is “High Volume” to Viacom? •From big to little, continuous “horizontal” support across 100+ global sites •Voting, polling, and data collection occurs 24/7 •No “maintenance windows” •Sudden spikes to 15K+ votes per second from on-air “Throws” during prime time viewing: “Go to the site and Vote Now!” •Storage of 100s of millions of votes for analysis after events 7
  • 9. Who will survive the Human Slime Car Wash!?!?!? 9
  • 10. Statistics (Pushing The Limit) 2015 Kids Choice Awards •531 Million votes (a new record!) •7 Million votes during the show 10
  • 11. Some Definitions Funnel •Our internal name for our system Site •A brand and/or site specific namespace for collecting data Tent-pole •A major programming (entertainment) event Collection •An individual poll, voting event, sweepstakes, etc. •NOT a MongoDB Collection Entry •A single vote or poll entry Processor •Performs an action on a entry (validate it, persists it, etc.) 11
  • 12. History •Why did we build Funnel? •Why did we choose Mongo? 12
  • 13. Why Did We Build It? •Previous systems unmanageable •One system for data collection •Contests, sweepstakes, small polls •Built in-house with ATG Dynamo and MySQL •Per-site deployment model meant multiple installations per brand •Flexible schema == MySql “xml blobs” •Separate system for high volume polling •Comercial •Lack of customization •Per-brand installation 13
  • 14. Why Did We Choose Mongo? •Flexible schema document style database provides the quick-to-market support needed by 100+ sites, brands, and countries (All who want things “just a little bit different”) •Proven scalability •JSON in and JSON out 14
  • 15. Architectural Goals • High write throughput over read throughput and consistency • Handle up to 10,000 1KB writes per second. Read throughput is secondary • High Availability • Replace dozens of separate installations and services • Wide adoption across internal brands 15
  • 16. Server Layout 16 Primary Secondary Secondary Replica Set 1 (day-to-day use) Replica Set 2 (tent-pole events) Primary Secondary Secondary
  • 17. Server Layout • High availability • Primary, Secondary configuration with automatic failover • Primary stores all reads and writes, secondary stays in- sync with Primary • Monitoring with MongoDB Management Service (MMS) • Email Alerts from MMS for high volume op inserts 17
  • 18. More on MMS 18 KCA 2015 MMS Graph
  • 20. Schema For a Typical Collection "_id" : "kca-live-vote-2015-event", "_class" : "com.mtvi.funnel.domain.model.collection.Collection", "site" : "kca.nick.com", "name" : "kca-live-vote-2015-event", "description" : "KCA Live Event", "owner" : "nuthalar", "start" : ISODate("2015-03-02T05:00:00Z"), "end" : ISODate("2015-05-10T04:00:00Z"), "createdDate" : ISODate("2015-03-03T17:34:55.113Z"), "lastUpdateDate" : ISODate("2015-03-26T14:40:15.665Z"), "tags" : ["live-show"], "processorChain" : [...], “questions” : [...] -- Questions has Options and Validators 20
  • 21. Processors • Each entry received by Funnel will be handled by an ordered list of processors (the ProcessorChain) As each processor in the list is visited, the processor will decide whether to continue to the next one or to terminate further processing • A Processor can raise an error, and its detail message will be configurable and localizable. When an error is raised, it can signal the system to take a few different actions depending on the severity of the error condition: Log the error but continue to processing Bubble up the error to the client and cease further processing Ignore the error, cease further processing, and return an OK response to the client 21
  • 24. Questions: Email { "name":"email", "displayText":"email", "persistable":true, "source":"ENTITY_BODY", "validators":[ { "enabled":true, "failureMessage":"Please enter a valid email address to proceed.", "contentType":"EmailAddressValidator", "_class":"com.mtvi.funnel.domain.model.collection.questions.validators.E mailAddressValidator" }, { "enabled":true, "failureMessage":"This field is required. Please enter a response to proceed.", "contentType":"RequiredValidator", "_class":"com.mtvi.funnel.domain.model.collection.questions.validators.RequiredValidator" } ], "seqNum":NumberLong(0), "tallyEnabled":false, "isMandatory":false, "contentType":"EmailQuestion" } 24
  • 26. Questions: Single Choice 26 { "multipleAnswers":false, "options":[ { "optionValue":"andrew-garfield-male-action-star", "displayText":"andrew-garfield-male-action-star", "customOption":false }, { "optionValue":"channing-tatum-male-action- star", "displayText":"channing-tatum-male-action- star", "customOption":false }, { "optionValue":"chris-evans-male-action- star", "displayText":"chris-evans-male-action- star", "customOption":false }, { "optionValue":"chris-pratt-male-action-star", "displayText":"chris-pratt-male-action-star", "customOption":false }, ], "writeInOptionEnabled":false, "name":"favorite-male-action-star", "displayText":"favorite-male-action-star", "persistable":true, "source":"ENTITY_BODY", "validators":[ { "enabled":false, "failureMessage":"This field is required. Please enter a response to proceed.", "contentType":"RequiredValidator", "_class":"com.mtvi.funnel.domain.model.collection.questions.validators.R equiredValidator" }, { "enabled":true, "failureMessage":"Please select a valid choice to proceed.", "contentType":"ChoiceValidator", "_class":"com.mtvi.funnel.domain.model.collection.questions.validators.C hoiceValidator" }, { "enabled":true, "failureMessage":"Please fill in the 'Other' value to proceed.", "contentType":"WriteInRequiredValidator", "_class":"com.mtvi.funnel.domain.model.collection.questions.validators.W riteInRequiredValidator" } ], "seqNum":NumberLong(0), "tallyEnabled":true, "isMandatory":false, "sm4MappingEnabled":false, "sm4Mapping":"", "exodusMapping":"", "contentType":"SingleChoiceQuestion", "_class":"com.mtvi.funnel.domain.model.collection.questions.QuestionWith Options" }
  • 27. An Entry would look like… 27 { "_id" : ObjectId("53c698c1ebd268ff9b76034d"), "answers" : { "question" : "option-3", "source" : "mobile", "True-Client-IP" : "166.77.6.8" }, "createdDate" : ISODate("2014-07-16T15:22:41.593Z") }
  • 29. A Tally would look like… 29 { "_id" : ObjectId("53c698c51180cc552e79c12d"), "option-1" : 1249596, "option-2" : 341404, "option-3" : 466646, "questionName" : "question", "timeWindowType" : "ALL_TIME" }
  • 30. Optimizations We didn’t get it perfect the first time: • Correct Indices - Index on created Date of Entry Collection. EnsureIndex is called during collection creation and update • Batch update of vote tallies - Update the count per second instead of per Entry • Hourly Stats – Pre-caluculating hourly totals saved resources during live events to get stats for past 24 hours, 7 days and 30 days 30
  • 31. SPAM Prevention •De-duplicator processor: De-duplicates X number of entries for a defined period (eg. 30 Entries per minute). Internal to Funnel application •VERISIGN DDoS Protection service •Akamai WAF (part of Kona Web Application Firewall) •CAPTCHA •Authentication (FLUX - Viacom Internal System) 31
  • 32. Before & After Previous Systems •Decentralized •Multiple Installations •Outdated App Server •Rigid Schema requiring rigid change control process 32 Funnel •Service Oriented •Performant •Flexible Schema; easily extended
  • 33. Our Track Record •100+ Sites •15K Collections •10+ Billion Votes to date 33
  • 34. Where else MongoDB is Used @ Viacom •Used in production since v 1.6 •Content Management System •Viacom Identity Platform (Auth & User Profiles) 34
  • 36. Who survived the Human Slime Carwash!?!?!? 36
  • 38. Thank You! 38 • Michael Makunas -- @mmakunas • Ramesh Nuthalapati -- @nuthalapati

Editor's Notes