SlideShare une entreprise Scribd logo
1  sur  20
Rethinking Scalable Real-time 
Cloud Service That Serves 
100K QPS with Scala, Akka, 
and Actor Based Design
High Concurrency / Low Latency / 
Scalable 廣告交易系統設計與演進 
Part. 1 
Vpon Inc. 
Austin Huang 
2013/8/3 
Topic shared during last COSCUP
Outline 
 Vpon? Who? 
 New Challenges 
 New Architecture 
 Lesson Learned 
 Q&A 
3
Vpon Inc. 
 創立於2008年 
 主要營運項目: Mobile AD 
 現為台灣本土最大的Mobile AD Network 
 研發中心: 台北 
 營運據點: 台北/ 上海/ 香港/ 東京 
 2014/7 完成B 輪千萬美金投資 
 夥伴數: 70+ (% of RD>50%,We are hiring!)
Typical use case 
Clicks 
Conversions 
The media 
Landing 
pages 
ADs
即時廣告交易系統 
 什麼是即時廣告交易系統? 
-「廣告費」與「廣告版位」的即時撮合交易 
6 
Media 
(手機App) 
即時廣告交易系統廣告主 
 手機每一次發出廣告請求,都需要依據其「時間/ 地 
點/ 使用的App / 電信公司/ 使用者偏好等」,即時 
找到最適合的廣告做投遞
所以需求是? 
「我要的很簡單,只要以最快的速度、 
最省錢的方法,把廣告投遞給最多最 
正確的人就好」by CEO 
7
Problems solved last year 
 Low Latency 
- < 50ms for EVERY request 
 High Concurrency 
- 8k+ QPS, increasing 
 Linear Scalable 
- High Growth Rate: YoY: 350% 
 Targeting 
- Big Data / Data Mining … 
 Low (or NO) Budget 
- What The F … 
廣告費欄位需即時正確, 
否則就會蒙受損失 
PS: 依照去年情況,系統費用欄位 
delay 一秒鐘,大約損失NT$300 
8
Architecture shared last year 
Tomcat 
Application 
haproxy 
… 
Tomcat 
Application 
Tomcat 
Application 
haproxy 
Infinispan Dist. Cluster 
Node A 
Infinispan Repl. Cluster 
Node N Node A 
Node N 
 Application Server: 15 nodes 
 Infinispan: 5 nodes, stores 100M K/V 
 Capacity: 8k+ QPS
New Challenges 
 Global business 
- Buy and Sell in different countries 
- Multiple DC / Hybrid cloud infrastructure 
 More business coverage 
- Self-operating Ad network 
- + Turnkey solution 
 Much more capacity requirement 
- Data from all over the world 
- 100k+ QPS, latency <50ms
Data Analysis 
DSP / AdN Platform 
Bidding 
Engine 
Pricing 
Engine 
MapReduce/Spark 
HBase 
Advertisers 
Message Routing / Streaming Processing 
Ad 
Request 
Hadoop Distributed 
File System 
(HDFS) 
User Profiles 
Ad Requests 
HTTP POST 
Avro Avro Avro 
Ad videos, 
images 
HTTP Get 
Data Processing and Archiving 
Creative 
and 
videos 
AD management 
Report UI 
(Django, RoR, 
SSH) 
Vpon AD services 
backend functions 
CDN 
Recommender System 
Other 
undergoing 
topics 
Reporting system 
Sales 
Support 
System 
AD-hoc 
reporting 
Operation 
Ganglia 
Solr 
AD Operation 
AD 
Monitoring 
System 
Scenario 
modeling 
Avro 
Web 
Proxy 
+ 
Cache 
User 
Profiles 
(Data 
Store) 
Rsync, Avro Avro 
Python + pig, hive, 
Hadoop Streaming, Spark 
Python + pig, hive, 
Hadoop Streaming, Spark 
HA Proxy
New Architecture 
 Asynchronous in design 
 Move computing to data 
 Cache in actors in every node 
- Reduce data accessing 
- No more cache consistency problem 
- Good for trouble shooting 
- Less maintenance cost 
 Remove hotspot by distribute tasks to actors 
 Flexible resource management 
- Shutdown server instance in off-peak
Move Computing to Data 
 Move data takes tremendous time 
- Remember we have less than 30ms 
 Access AD decision data takes time 
 Heavy loading on DataStore / Cache 
Tomcat 
App 
haproxy 
Tomcat 
… App 
Tomcat 
App 
haproxy 
Infinispan Dist. Cluster 
Node A 
Infinispan Repl. Cluster 
Node N Node A 
Node N 
User Profile = 2kB 
QPS = 100k 
At least 1.56Gb/s
Why Scala and Akka 
 Scala 
- Functional 
- Great for concurrency 
- Reuse legacy Java code 
 Akka 
- Actor Pattern 
- Asynchronous and Distributed by design. 
- Form cluster
New Architecture
New Architecture – cont.
Preliminary Benchmark 
 Agent Cluster (Not yet optimized) 
 AWS 
- Akka Node 
or3.xlarge (8 vCPU, 61G RAM) * 3 
- Data Store 
oi2.xlarge (8 vCPU, 61G RAM, 1600GB SSD) * 3 
 Results 
- 15,321 QPS (~10x comparing to old 
architecture) 
- 23ms average process time
Lesson Learned 
 Maximizing server capacity by asynchronous 
- Asynchronous is never easy 
- It takes time to learn the correct practice 
 Move computing to data 
- Accessing data is expensive 
 Reduced hotspot / bottleneck by separating tasks 
into different actors in different nodes 
- Dispatch tasks by consistent hash
We need 
Scala, Java, Python, RoR, Hadoop, Spark, Docker, Operation experts
THANK YOU! 
QUESTIONS ? 
20

Contenu connexe

Dernier

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制vexqp
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabiaahmedjiabur940
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制vexqp
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdftheeltifs
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
SR-101-01012024-EN.docx  Federal Constitution  of the Swiss ConfederationSR-101-01012024-EN.docx  Federal Constitution  of the Swiss Confederation
SR-101-01012024-EN.docx Federal Constitution of the Swiss ConfederationEfruzAsilolu
 

Dernier (20)

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
 
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdf
 
Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...Sequential and reinforcement learning for demand side management by Margaux B...
Sequential and reinforcement learning for demand side management by Margaux B...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
SR-101-01012024-EN.docx  Federal Constitution  of the Swiss ConfederationSR-101-01012024-EN.docx  Federal Constitution  of the Swiss Confederation
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
 

En vedette

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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 
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...Applitools
 
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 WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

En vedette (20)

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
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Vpon @ COSCUP 2014, Rethinking scalable real-time cloud service that serves 100k QPS with Scala, Akka, and Actor based design

  • 1. Rethinking Scalable Real-time Cloud Service That Serves 100K QPS with Scala, Akka, and Actor Based Design
  • 2. High Concurrency / Low Latency / Scalable 廣告交易系統設計與演進 Part. 1 Vpon Inc. Austin Huang 2013/8/3 Topic shared during last COSCUP
  • 3. Outline  Vpon? Who?  New Challenges  New Architecture  Lesson Learned  Q&A 3
  • 4. Vpon Inc.  創立於2008年  主要營運項目: Mobile AD  現為台灣本土最大的Mobile AD Network  研發中心: 台北  營運據點: 台北/ 上海/ 香港/ 東京  2014/7 完成B 輪千萬美金投資  夥伴數: 70+ (% of RD>50%,We are hiring!)
  • 5. Typical use case Clicks Conversions The media Landing pages ADs
  • 6. 即時廣告交易系統  什麼是即時廣告交易系統? -「廣告費」與「廣告版位」的即時撮合交易 6 Media (手機App) 即時廣告交易系統廣告主  手機每一次發出廣告請求,都需要依據其「時間/ 地 點/ 使用的App / 電信公司/ 使用者偏好等」,即時 找到最適合的廣告做投遞
  • 8. Problems solved last year  Low Latency - < 50ms for EVERY request  High Concurrency - 8k+ QPS, increasing  Linear Scalable - High Growth Rate: YoY: 350%  Targeting - Big Data / Data Mining …  Low (or NO) Budget - What The F … 廣告費欄位需即時正確, 否則就會蒙受損失 PS: 依照去年情況,系統費用欄位 delay 一秒鐘,大約損失NT$300 8
  • 9. Architecture shared last year Tomcat Application haproxy … Tomcat Application Tomcat Application haproxy Infinispan Dist. Cluster Node A Infinispan Repl. Cluster Node N Node A Node N  Application Server: 15 nodes  Infinispan: 5 nodes, stores 100M K/V  Capacity: 8k+ QPS
  • 10. New Challenges  Global business - Buy and Sell in different countries - Multiple DC / Hybrid cloud infrastructure  More business coverage - Self-operating Ad network - + Turnkey solution  Much more capacity requirement - Data from all over the world - 100k+ QPS, latency <50ms
  • 11. Data Analysis DSP / AdN Platform Bidding Engine Pricing Engine MapReduce/Spark HBase Advertisers Message Routing / Streaming Processing Ad Request Hadoop Distributed File System (HDFS) User Profiles Ad Requests HTTP POST Avro Avro Avro Ad videos, images HTTP Get Data Processing and Archiving Creative and videos AD management Report UI (Django, RoR, SSH) Vpon AD services backend functions CDN Recommender System Other undergoing topics Reporting system Sales Support System AD-hoc reporting Operation Ganglia Solr AD Operation AD Monitoring System Scenario modeling Avro Web Proxy + Cache User Profiles (Data Store) Rsync, Avro Avro Python + pig, hive, Hadoop Streaming, Spark Python + pig, hive, Hadoop Streaming, Spark HA Proxy
  • 12. New Architecture  Asynchronous in design  Move computing to data  Cache in actors in every node - Reduce data accessing - No more cache consistency problem - Good for trouble shooting - Less maintenance cost  Remove hotspot by distribute tasks to actors  Flexible resource management - Shutdown server instance in off-peak
  • 13. Move Computing to Data  Move data takes tremendous time - Remember we have less than 30ms  Access AD decision data takes time  Heavy loading on DataStore / Cache Tomcat App haproxy Tomcat … App Tomcat App haproxy Infinispan Dist. Cluster Node A Infinispan Repl. Cluster Node N Node A Node N User Profile = 2kB QPS = 100k At least 1.56Gb/s
  • 14. Why Scala and Akka  Scala - Functional - Great for concurrency - Reuse legacy Java code  Akka - Actor Pattern - Asynchronous and Distributed by design. - Form cluster
  • 17. Preliminary Benchmark  Agent Cluster (Not yet optimized)  AWS - Akka Node or3.xlarge (8 vCPU, 61G RAM) * 3 - Data Store oi2.xlarge (8 vCPU, 61G RAM, 1600GB SSD) * 3  Results - 15,321 QPS (~10x comparing to old architecture) - 23ms average process time
  • 18. Lesson Learned  Maximizing server capacity by asynchronous - Asynchronous is never easy - It takes time to learn the correct practice  Move computing to data - Accessing data is expensive  Reduced hotspot / bottleneck by separating tasks into different actors in different nodes - Dispatch tasks by consistent hash
  • 19. We need Scala, Java, Python, RoR, Hadoop, Spark, Docker, Operation experts

Notes de l'éditeur

  1. 加入示意圖
  2. 這些看起來似乎都沒有什麼特別,那挑戰到底在哪裡 ??
  3. SaaS turnkey solution - deployment - 24/7 -> monitoring, rolling upgrade..