SlideShare a Scribd company logo
1 of 57
Download to read offline
Lucas Ceballos
Size does matter@ nerdear.la 2018
1
Lucas Ceballos
Size does matter@ nerdear.la 2018
2
SIZEDOES MATTER
Lucas Ceballos
Size does matter@ nerdear.la 2018
2
SIZEDOES MATTER
HOW TO BUILD A SERVERLESS
PETA-BYTE SCALE DATABASE
Lucas Ceballos
Size does matter@ nerdear.la 2018
3
Lucas Ceballos
linkedin.com/in/lucas-ceballos
Digital HouseHeadway UTN
Lucas Ceballos
Size does matter@ nerdear.la 2018
3
Lucas Ceballos
linkedin.com/in/lucas-ceballos
Digital HouseHeadway UTN
Lucas Ceballos
Size does matter@ nerdear.la 2018
4
DOITLATER,DOITBETTER
Como procesar mas de 100k eventos por segundo y no morir en el intento
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 5
CONTEXT
CHAPTER 1
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 6
P O W E R E D B Y T E C H N O L O G Y
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER
Click IDImpression ID
7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
△t△t
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
△t△t
<1min 1-∞min
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
△t△t
<1min 1-∞min
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 7
IMPRESSION
+50K / SEG
CLICK
+5K / SEG
CONVERSION
+15K / HR
AD LIFE CYCLE
△t△t
<1min AttributionWindow
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 8
THEPROBLEM
CHAPTER 2
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 9
UNDER THE HOOD
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Conversions
W R
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 9
UNDER THE HOOD
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Conversions
W R
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 9
UNDER THE HOOD
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Conversions
W R
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 9
UNDER THE HOOD
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Conversions
W R
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 9
UNDER THE HOOD
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Conversions
W R
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 10
{“_id”:"1808210149a523932a4ceaed","version":5,"earn":
0,"spent":0,"converted":false,"campaignId":
280392,"categoryGroup":"mainstream","publisherId":"1046
6_581_34_863796162656735232","adSlot":null,"siteId":nul
l,"sellerId":null,"formatId":null,"sourceUid":"59af4b01
e9cbfd600085ca9df0e709ed","appId":"","bundleId":null,"d
eviceId":null,"ip":"170.79.119.28","referer":null,"user
Agent":"Mozilla/5.0(Linux;Android8.0;N820Build/
KOT49H)AppleWebKit/537.36(KHTML,likeGecko)Chrome/
60.0.3112MobileSafari/
537.36","countryCode":"BR","countryName":"Brazil","regi
on":"RioGrandedoNorte","city":"Natal","isp":"JDSMedeiro
sProvedorDeInternet-
Me","connectionType":"wifi","latitude":-5.8002,"longitu
de":-35.2107,"device":"N820","deviceType":"mobile","bro
wser":"Chrome","browserVersion":"60.0.3112","os":"Andro
id","osVersion":"8.0","payout":3.23,"cost":
1.87,"share":0,"impressions":0,"clicks":
1,"conversions":
0,"createdAt":"20180821014947","updatedAt":"20180821014
947","date":"2018-08-21T04:49:47.205Z","datetime":"2018
-08-2101:49:47","dateUpdated":"2018-08-21T04:49:47.205Z
","callbackUrl":"http://click.foo-bar.com/fass/?
atoken=f8ad6505fa1b53fc948c8543dc0afc7a05296200&version
=1&c=tracker.postback&click_id={sid}"}
CLICK TAXONOMY
JSON
FORMAT
1KB
NO COMP.
650B
GZIP
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 11
1808210149a523932a4ceaed
CLICK ID
Date &Time (up to minute) Random Hexadecimal String
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 12
500.000.000
x 650
x 30
Dailyclicks
Avg. click size
Days/month
~9 TB/month
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 13
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Events
W R
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 13
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 13
COST
2
1 3
LATENCYSIZE
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 14
FIRSTATTEMPT
CHAPTER 3
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 15
FIRST ATTEMPT
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Events
W R
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 15
FIRST ATTEMPT
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Events
W R
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 15
FIRST ATTEMPT
EC2
EC2
EC2
EC2
EC2
EC2
EC2
EC2
Incoming
Clicks
Incoming
Events
W R
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 16
10TB
x 3
x 1
x 102,4
500M clicks/month
Mongo replicas
Months Retention
GP2 cost/tb/month
~3000 USD/month
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 17
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 18
ANEWHOPE
CHAPTER 4
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 19
ALTERNATIVES
REDIS MEMCACHED DYNAMODB CASSANDRA
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 19
ALTERNATIVES
REDIS MEMCACHED DYNAMODB CASSANDRA
In Memory
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 19
ALTERNATIVES
REDIS MEMCACHED DYNAMODB CASSANDRA
In Memory Costly
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 20
THINKOUTOFTHEBOX
CHAPTER 5
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 21
t1 t2
attribution window
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 21
t1 t2
attribution window
24H
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 21
t1 t2
attribution window
24H
90%<24H
10%>24H
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 21
t1 t2
attribution window
1H
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 21
t1 t2
attribution window
1H
70%<1H
30%>1H
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 22
“LAGRIETA”
FINAL CHAPTER
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 23
H T
Last hourclicks
C LD
> 1 hourclicks
FREQUENTLY
ACCESSED
SMALL
NUMBER
UNFREQUENTLY
ACCESSED
HUGE
NUMBER
+ +
= =
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 23
H T
Last hourclicks
C LD
> 1 hourclicks
+ +
= =
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 24
UNDER THE HOOD
EC2
EC2
EC2
EC2
Incoming
Clicks
EC2
EC2
EC2
EC2
Incoming
Conversions
H T H T
C LDC LD
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 25
H T
EC2
EC2
EC2
EC2
Incoming
Clicks
CSV
EC2
EC2
EC2
EC2
Incoming
Conversions
(450b)
1 hour~ 9GB
Elasticache
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 26
EC2
EC2
EC2
EC2
Incoming
Clicks
C LD
JSON
1m BUFFERING
PARQUET
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 27
EC2
EC2
EC2
EC2
Incoming
Conversions
C LD
SQS Athena Clicks
H TSQS
Retry
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 27
EC2
EC2
EC2
EC2
Incoming
Conversions
C LD
SQS Athena Clicks
H TSQS
Retry
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 27
EC2
EC2
EC2
EC2
Incoming
Conversions
C LD
SQS Athena Clicks
H TSQS
Retry
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 28
JSON
PARQUET
Athena
PRESTO dt=2018-08-21-01-51
dt=2018-08-21-01-50
dt=2018-08-21-01-49
dt=2018-08-21-01-48
dt=2018-08-21-01-47
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 28
JSON
PARQUET
Athena
PRESTO dt=2018-08-21-01-51
dt=2018-08-21-01-50
dt=2018-08-21-01-49
dt=2018-08-21-01-48
dt=2018-08-21-01-47
Fridge
1808210149a523932a4ceaed
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 28
JSON
PARQUET
Athena
PRESTO dt=2018-08-21-01-51
dt=2018-08-21-01-50
dt=2018-08-21-01-49
dt=2018-08-21-01-48
dt=2018-08-21-01-47
Fridge
1808210149a523932a4ceaed
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 29
EC2
EC2
EC2
EC2
Incoming
Conversions
C LD
SQS Athena Clicks
H TSQS
Retry
Fridge
Lucas Ceballos
Size does matter@ nerdear.la 2018
SIZEDOESMATTER 30
443
+ 300
+ 290
+ 140
S3 Storage
Elasticache
Athena
Lambdas
~1173 USD/month
Lucas Ceballos
Size does matter@ nerdear.la 2018
31
www.headwaydigital.comlucas@headwaydigital.com
Gracias!Q&A
lucas-ceballos
We’re hiring!

More Related Content

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Size does matter - How to build a serverless petabyte scale database

  • 1. Lucas Ceballos Size does matter@ nerdear.la 2018 1
  • 2. Lucas Ceballos Size does matter@ nerdear.la 2018 2 SIZEDOES MATTER
  • 3. Lucas Ceballos Size does matter@ nerdear.la 2018 2 SIZEDOES MATTER HOW TO BUILD A SERVERLESS PETA-BYTE SCALE DATABASE
  • 4. Lucas Ceballos Size does matter@ nerdear.la 2018 3 Lucas Ceballos linkedin.com/in/lucas-ceballos Digital HouseHeadway UTN
  • 5. Lucas Ceballos Size does matter@ nerdear.la 2018 3 Lucas Ceballos linkedin.com/in/lucas-ceballos Digital HouseHeadway UTN
  • 6. Lucas Ceballos Size does matter@ nerdear.la 2018 4 DOITLATER,DOITBETTER Como procesar mas de 100k eventos por segundo y no morir en el intento
  • 7. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 5 CONTEXT CHAPTER 1
  • 8. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 6 P O W E R E D B Y T E C H N O L O G Y
  • 9. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE
  • 10. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER Click IDImpression ID 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE
  • 11. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE △t△t
  • 12. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE △t△t <1min 1-∞min
  • 13. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE △t△t <1min 1-∞min
  • 14. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 7 IMPRESSION +50K / SEG CLICK +5K / SEG CONVERSION +15K / HR AD LIFE CYCLE △t△t <1min AttributionWindow
  • 15. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 8 THEPROBLEM CHAPTER 2
  • 16. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 9 UNDER THE HOOD EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Conversions W R attribution window
  • 17. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 9 UNDER THE HOOD EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Conversions W R attribution window
  • 18. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 9 UNDER THE HOOD EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Conversions W R attribution window
  • 19. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 9 UNDER THE HOOD EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Conversions W R attribution window
  • 20. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 9 UNDER THE HOOD EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Conversions W R attribution window
  • 21. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 10 {“_id”:"1808210149a523932a4ceaed","version":5,"earn": 0,"spent":0,"converted":false,"campaignId": 280392,"categoryGroup":"mainstream","publisherId":"1046 6_581_34_863796162656735232","adSlot":null,"siteId":nul l,"sellerId":null,"formatId":null,"sourceUid":"59af4b01 e9cbfd600085ca9df0e709ed","appId":"","bundleId":null,"d eviceId":null,"ip":"170.79.119.28","referer":null,"user Agent":"Mozilla/5.0(Linux;Android8.0;N820Build/ KOT49H)AppleWebKit/537.36(KHTML,likeGecko)Chrome/ 60.0.3112MobileSafari/ 537.36","countryCode":"BR","countryName":"Brazil","regi on":"RioGrandedoNorte","city":"Natal","isp":"JDSMedeiro sProvedorDeInternet- Me","connectionType":"wifi","latitude":-5.8002,"longitu de":-35.2107,"device":"N820","deviceType":"mobile","bro wser":"Chrome","browserVersion":"60.0.3112","os":"Andro id","osVersion":"8.0","payout":3.23,"cost": 1.87,"share":0,"impressions":0,"clicks": 1,"conversions": 0,"createdAt":"20180821014947","updatedAt":"20180821014 947","date":"2018-08-21T04:49:47.205Z","datetime":"2018 -08-2101:49:47","dateUpdated":"2018-08-21T04:49:47.205Z ","callbackUrl":"http://click.foo-bar.com/fass/? atoken=f8ad6505fa1b53fc948c8543dc0afc7a05296200&version =1&c=tracker.postback&click_id={sid}"} CLICK TAXONOMY JSON FORMAT 1KB NO COMP. 650B GZIP
  • 22. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 11 1808210149a523932a4ceaed CLICK ID Date &Time (up to minute) Random Hexadecimal String
  • 23. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 12 500.000.000 x 650 x 30 Dailyclicks Avg. click size Days/month ~9 TB/month
  • 24. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 13 EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Events W R
  • 25. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 13
  • 26. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 13 COST 2 1 3 LATENCYSIZE
  • 27. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 14 FIRSTATTEMPT CHAPTER 3
  • 28. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 15 FIRST ATTEMPT EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Events W R
  • 29. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 15 FIRST ATTEMPT EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Events W R
  • 30. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 15 FIRST ATTEMPT EC2 EC2 EC2 EC2 EC2 EC2 EC2 EC2 Incoming Clicks Incoming Events W R
  • 31. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 16 10TB x 3 x 1 x 102,4 500M clicks/month Mongo replicas Months Retention GP2 cost/tb/month ~3000 USD/month
  • 32. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 17
  • 33. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 18 ANEWHOPE CHAPTER 4
  • 34. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 19 ALTERNATIVES REDIS MEMCACHED DYNAMODB CASSANDRA
  • 35. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 19 ALTERNATIVES REDIS MEMCACHED DYNAMODB CASSANDRA In Memory
  • 36. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 19 ALTERNATIVES REDIS MEMCACHED DYNAMODB CASSANDRA In Memory Costly
  • 37. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 20 THINKOUTOFTHEBOX CHAPTER 5
  • 38. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 21 t1 t2 attribution window
  • 39. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 21 t1 t2 attribution window 24H
  • 40. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 21 t1 t2 attribution window 24H 90%<24H 10%>24H
  • 41. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 21 t1 t2 attribution window 1H
  • 42. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 21 t1 t2 attribution window 1H 70%<1H 30%>1H
  • 43. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 22 “LAGRIETA” FINAL CHAPTER
  • 44. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 23 H T Last hourclicks C LD > 1 hourclicks FREQUENTLY ACCESSED SMALL NUMBER UNFREQUENTLY ACCESSED HUGE NUMBER + + = =
  • 45. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 23 H T Last hourclicks C LD > 1 hourclicks + + = = Fridge
  • 46. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 24 UNDER THE HOOD EC2 EC2 EC2 EC2 Incoming Clicks EC2 EC2 EC2 EC2 Incoming Conversions H T H T C LDC LD Fridge
  • 47. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 25 H T EC2 EC2 EC2 EC2 Incoming Clicks CSV EC2 EC2 EC2 EC2 Incoming Conversions (450b) 1 hour~ 9GB Elasticache
  • 48. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 26 EC2 EC2 EC2 EC2 Incoming Clicks C LD JSON 1m BUFFERING PARQUET Fridge
  • 49. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 27 EC2 EC2 EC2 EC2 Incoming Conversions C LD SQS Athena Clicks H TSQS Retry Fridge
  • 50. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 27 EC2 EC2 EC2 EC2 Incoming Conversions C LD SQS Athena Clicks H TSQS Retry Fridge
  • 51. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 27 EC2 EC2 EC2 EC2 Incoming Conversions C LD SQS Athena Clicks H TSQS Retry Fridge
  • 52. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 28 JSON PARQUET Athena PRESTO dt=2018-08-21-01-51 dt=2018-08-21-01-50 dt=2018-08-21-01-49 dt=2018-08-21-01-48 dt=2018-08-21-01-47 Fridge
  • 53. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 28 JSON PARQUET Athena PRESTO dt=2018-08-21-01-51 dt=2018-08-21-01-50 dt=2018-08-21-01-49 dt=2018-08-21-01-48 dt=2018-08-21-01-47 Fridge 1808210149a523932a4ceaed
  • 54. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 28 JSON PARQUET Athena PRESTO dt=2018-08-21-01-51 dt=2018-08-21-01-50 dt=2018-08-21-01-49 dt=2018-08-21-01-48 dt=2018-08-21-01-47 Fridge 1808210149a523932a4ceaed
  • 55. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 29 EC2 EC2 EC2 EC2 Incoming Conversions C LD SQS Athena Clicks H TSQS Retry Fridge
  • 56. Lucas Ceballos Size does matter@ nerdear.la 2018 SIZEDOESMATTER 30 443 + 300 + 290 + 140 S3 Storage Elasticache Athena Lambdas ~1173 USD/month
  • 57. Lucas Ceballos Size does matter@ nerdear.la 2018 31 www.headwaydigital.comlucas@headwaydigital.com Gracias!Q&A lucas-ceballos We’re hiring!