Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
広告配信サーバーと広告配信比率最適化問題
Search
Ken Wagatsuma
February 10, 2018
Technology
1
930
広告配信サーバーと広告配信比率最適化問題
Lightening Talk at
https://techconf.cookpad.com/2018/
Ken Wagatsuma
February 10, 2018
Tweet
Share
More Decks by Ken Wagatsuma
See All by Ken Wagatsuma
Pregel Graph Compute Engines - Supersteps Exampls
kenju
1
200
Kafka on Kubernetes with Strimzi
kenju
1
140
AWS DynamoDB Accelerator (DAX) 101
kenju
3
6.9k
Moden browser introduction
kenju
1
360
Cookpad summer internship 2019 - API
kenju
0
10k
Introduction to Design Patterns
kenju
0
66
GraphQL Asia 2019 "Re-architecture of a decade-old app with BFF/GraphQL"
kenju
0
8.8k
Introduction to TypeScript
kenju
0
680
Introduction to Programmatic Ad
kenju
0
220
Other Decks in Technology
See All in Technology
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
700
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
Engineer Career Talk
lycorp_recruit_jp
0
190
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
0
120
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
260
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
140
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Statistics for Hackers
jakevdp
796
220k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
What's in a price? How to price your products and services
michaelherold
243
12k
Fireside Chat
paigeccino
34
3k
Ruby is Unlike a Banana
tanoku
97
11k
Designing for humans not robots
tammielis
250
25k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
ࠂ৴αʔόʔͱ ࠂ৴ൺ࠷దԽ ϝσΟΞϓϩμΫτ։ൃ෦ ,FOKV8BHBUTVNB
8IP Kenju Wagatsuma (github.com/kenju) • ϝσΟΞϓϩμΫτ։ൃ෦ • αʔόʔαΠυΤϯδχΞ • ͖ͳͷɿRuby,
ίʔώʔ, ϩδΧϧΫοΩϯά • ݏ͍ͳͷɿ1ϲ݄લʹॻ͍ͨࣗͷίʔυ
ϝσΟΞϓϩμΫτ։ൃ෦ ୲αʔϏεɿ ࠂ৴, storeTV, cookpadTV, OEM, ͦͷଞଟ ࢀߟɿ ։ൃऀϒϩάʰΫοΫύουͷࠂΤϯδχΞԿΛ ͍ͬͯΔͷ͔ʱ
ຊ͍ͨ͜͠ͱɻ ϝσΟΞϓϩμΫτ։ൃ෦Ͱ ͲΜͳϓϩδΣΫτΛ͍ͬͯΔͷ͔ʁ
νʔϜʹೖͬͯϲ݄ޙʹऔΓΜͩϓϩδΣΫτ ΫοΫύουͷࠂ৴αʔόʔʹ͓͚Δ ࠂ৴ൺͷࣗಈ࠷దԽϓϩδΣΫτɻ
ݫ͍͠εέδϡʔϧ • ϝσΟΞϓϩμΫτ։ൃ෦δϣΠϯ - 10݄த० • ͓खฒΈഈݟϓϩδΣΫτ - ~11݄த० •
৴࠷దԽτϥΠΞϧ - 12/4(݄) 10:00 - 12/11(݄) 10:00 ???
ղܾ͍ͨ͠՝ • ʑͷखӡ༻ʹΑΔνϡʔχϯά͕ඞཁ - => ࡞ۀ͕ൃੜ • ӡ༻ऀͷܦݧͱצʹཔͬͨνϡʔχϯά - =>
ҟಈ࣌ಋೖ࣌ͷίετ͕ߴա͗ • ࠷దͳࡏݿൺΛࣗಈͰௐͰ͖ͳ͍ - => ࠂܝग़ͷػձଛࣦ
Ͳ͏ղܾ͢Δ͔ • ࡏݿׂྔͱ࣮͔Β࠷దͳ৴ൺͷิ ਖ਼Λߦ͏ - ΠϯϓϨογϣϯϕʔε͔ΒΫϦοΫϕʔεͷ৴ - ΫϦοΫ༧ଌΛར༻ͨ͠ൺͷࣗಈ࠷దԽ - ϦΞϧλΠϜूܭσʔλΛ׆༻ͨ͠ΞʔΩςΫνϟ
‣ Lambda Architecture ʹ͓͚Δ Speed Layer
l4QFFE-BZFSzPO"84 • Kinesis, DynamoDB, Lambda Λ׆༻ͨ͠ Speed Layer (from Lambda
Architecture) • طଘͷετϦʔϜʹɺΫ ϦοΫܭࢉϨΠϠʔΛ Ճ͚ͨͩ͠ = ઌਓͷݞ ʹΔ
ৄ͍ͪ͜͠Β ࢀߟɿ ʰCookpad Tech Kitchen #9 ʙ1ߦͷϩάͷ͜͏ ଆʙ Λ։࠵͠·ͨ͠ʂʱ
ΫϦοΫ༧ଌ͍͠ʂʂʂ • ޯϒʔεςΟϯάܾఆʢGBDTʣΛ༻͍ͨࠂ͝ͱͷΫϦοΫ༧ଌ - Facebook https://code.facebook.com/posts/975025089299409/evaluating-boosted-decision-trees-for-billions-of-users - SmartNews https://speakerdeck.com/komiya_atsushi/gbdt-niyorukuritukulu-yu-ce-wogao-su-hua-sitai-number-oresikanaito-vol-dot-4 •
ଟόϯσΟοτͷҰछͰ͋ΔMortal Multi-Armed BanditsͷԠ༻ - Voyage Group http://techlog.voyagegroup.com/entry/2015/04/03/114547ɹ • Neural Networkͷ૯߹֨ಆٕʢ͕͢͞Googleʣ - Google http://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdfɹ • ৴པͱ࣮ͷϩδεςΟοΫճؼʢୠܻ͕͠ԯϨϕϧʣ - Criteo http://olivier.chapelle.cc/pub/ngdstone.pdfɹ
ؒʹ߹Θͳ͍ʂ • τϥΠΞϧͳΜͱͯ͠ʹ࣮ࢪ͍ͨ͠ - վળͷαΠΫϧΛճͨ͢Ί • QCDͰݴ͏ͳΒɺDelivery, QualityΛ༏ઌ - ͳΜͱͯؒ͠ʹ߹Θ͍ͤͨʂ
• ࠷ॳ͔Βᘳͳਫ਼༧ଌ·ͣෆՄೳ - ػցֶशͰղܾ͠ͳͯ͘Α͍͔·ͣߟ͑Δ - ࢀߟɿʰࣄͰ͡ΊΔػցֶशʱ
ҠಈฏۉԞ͕ਂ͍ • SMA (Simple Moving Average) = ۙ N ݸͷॏΈ͚ͷͳ͍୯७ͳฏۉ
• WMA (Weighted Moving Average) = ΑΓ࠷ۙͷσʔλʹॏΈ͚ • EWMA (Exponentially Weighted Moving Average) = ࢦؔతʹॏΈ͚ • MMA (Modified Moving Average) = EWMAͷѥछ ଞʹTriangle MA, Sine Weighted MA, KZ Filtering,...etc ࢀߟɿhttps://en.wikipedia.org/wiki/Moving_average#Simple_moving_averag
աڈϩάΛݩʹΞϧΰϦζϜͷਫ਼Λੳ • Jupyter Notebook / Python - ࢀߟɿ։ൃऀϒϩάʰRailsΤϯ δχΞʹཱͭJupyter Notebook
ͱiRubyʱ • ൺֱͨ͠ΞϧΰϦζϜ - Total Average - Cumulative Average - Simple Moving Average (3 Hours) - Simple Moving Average (6 Hours)
τϥΠΞϧ݁Ռ • ิਖ਼ͷϩδοΫʹ՝ ͕ݟ͔ͭͬͨ ͷɺτϥΠΞϧͱ͠ ͯޭ
ظతνϡʔχϯά • Speed Layer ͷ࠶ઃܭɾຏ͖ࠐΈ - ετϦʔϜॲཧʹԊͬͨσʔλͷྲྀΕ • ෛ࠴ =
ະୡ ΛՃຯͨ͠ϩδοΫ - ୈҰ࣍τϥΠΞϧΛ͍ͬͯͳ͔ͬͨΒݟ͑ͳ͔ͬͨ՝ • ҠಈฏۉΞϧΰϦζϜͷվળ - Batch LayerͰΦϑϥΠϯͰܭࢉ&࠷ਫ਼͕ྑ͍ͷΛબ - Gem࡞ͬͨ https://github.com/kenju/moving_avg-ruby
தظͰ͍͖ͬͯ • ΫϦοΫ༧ଌਫ਼ͷߋͳΔ্ˍ৽نࠂ։ൃ - ػցֶशϨΠϠʔͷຊ൪ಋೖ • Lambda Architectureͷຏ͖ࠐΈ - ࢀߟɿ։ൃऀϒϩάʰαʔόʔϨεͳόοΫΞοϓγεςϜ
Λ AWS SAM Λ༻͍ͯγϡοͱߏங͢Δʱ • ࠂ৴αʔόʔࣗମͷѹతվળ - ։ൃج൫ͷڥඋ - ύϑΥʔϚϯε࠷దԽɺϨΨγʔίʔυͷվળ
ຖͷྉཧΛָ͠Έʹ͢Δ 5IBOLZPV