accelerating adtech on aws #awsadtechjp

44
Accelerating AdTech on AWS #AWSAdTechJP 2016年7⽉ Amazon Web Services Japan 篠原英治 #AWSAdTechJP

Upload: eiji-shinohara

Post on 15-Apr-2017

3.703 views

Category:

Technology


4 download

TRANSCRIPT

Accelerating AdTech on AWS#AWSAdTechJP

2016年7⽉ Amazon Web Services Japan 篠原英治

#AWSAdTechJP

Name:Eiji Shinohara / 篠原 英治Role:• AWS Solutions Architect

- Ad Tech- Startup

• Subject Matter Expert- Search services

Twitter : @shinodoggBlog : http://shinodogg.com

Who am I?

#AWSAdTechJP

Whatʻs dangerous is not to evolve...危険な事とは、進化しないことである…

Jeff Bezos / ジェフベゾズ

#AWSAdTechJP

AWS AdTechチームのゴール• アドテク企業のお客さまのビジネスをより深く理解し

技術的な課題を⾒出す

• データを収集し、結論を導き出し、AWSのソリューションを⽤いてそこにどのように貢献できるかを探る

• Evolve. お客さまの更なる進化と新サービス開発⼒をAWSのソリューションを通じて加速させる

#AWSAdTechJP

Advertiser Solutions

Ad Networks and Exchanges

Publisher Solutions

媒体主広告主マーケター Data Providers

AWS AdTechチームのTarget Scope

Industry Scope

#AWSAdTechJP

Advertiser Solutions

Ad Networks and Exchanges

Publisher Solutions

媒体主広告主マーケター Data Providers

AWS AdTechチームのTarget Scope

Industry Scope広告代理店

DSP SSP

最近ではMobileやVideoが伸びている

Low Latency 且つ Petabyte scale のData Sets

#AWSAdTechJP

デジタルマーケティング業界全体のグローバルなトレンド

1. ⾮常に細分化されてきていて、参⼊障壁が低くなっている2. 広告主から媒体主にいたるバリューチェーンが⾮常に複雑に

なっている – 数多くの仲介者 (およそ広告費全体の60%を取得)

3. マーケット全体は⾮常に伸びている – 2015年は17兆円($170B)。2017年は20兆円($200B)を超えると⾔われている

4. Mobile, Video, RTBといった分野は顕著に伸びているRTBは2018年には1.2兆円($12B)になるという予想も

http://www.slideshare.net/AmazonWebServices/digital-advertising-on-aws-popup-loft-tel-aviv/6#AWSAdTechJP

Mobile⾼い成⻑率であるが、USではcompetitiveな状況

http://global-adtech.jp/blog/2227https://techcrunch.com/2016/07/13/pokemon-go-will-soon-get-ads-in-the-form-of-sponsored-locations/

#AWSAdTechJP

RTB⾼い成⻑率。マージンは低く、効率的な運⽤が鍵

http://rtbsquare.ciao.jp/?p=12071

#AWSAdTechJP

Video

⾼い成⻑率。⾼いeCPM不正アクセス/Ad blockingの課題VAST(Video Ad Serving Template)4.0対応

#AWSAdTechJP

undifferentiated heavy lifting• 2006年のWeb 2.0 SummitでTim OʼReilly が Jeff Bezos

と対談• その際、ジェフは“undifferentiated heavy lifting”につい

て⾔及しました

http://cdn.oreillystatic.com/network/2006/12/20/web2-jeff-bezos-video06.mp4

https://www.flickr.com/photos/farber/292880154

#AWSAdTechJP

Industry Solutions• Amazon CTO の Werner Vogels もメディアの取材の際に、

『Stop spending money on “undifferentiated heavy lifting”』とコメントしています

http://www.cio.co.nz/article/466635/amazon_cto_stop_spending_money_undifferentiated_heavy_lifting_/

#AWSAdTechJP

Industry Solutions• “undifferentiated heavy lifting” 『他との差別

化に繋がらない重労働』の排除をAWSのソリューションと共にお客さまにご提供するのが我々のミッション

#AWSAdTechJP

例えば Real Time Bidding

Differentiators差別化

Algorithms for RTB

Machine Learning Models

Heavy Lifting重労働

Scaling EC2 Instances

Low Latency NoSQL

Heavy Lifting重労働

Data Access Libraries

Optimizing Networking

#AWSAdTechJP

RTB における費⽤曲線

• Bidderと同じ場所に配置する必要性?

• DedicatedなNetworkingチームが必要?

• ⾼価なNetwork製品を買わなければいけない?

$0

$100,000

$200,000

$300,000

$400,000

$500,000

$600,000

1 2 5 7 10

USD

Time (ms)

Monthly RTB Fleet Spend vs. Roundrip Exchange Latency (ms)

#AWSAdTechJP

RTBのプラットフォームにおいてHadoopのバッチ処理を1⽇約8時間、2,500台以上のマシンで運⽤していて、SPOTインスタンス等を活⽤して、1台あたり1⽇ $0.05 以下のコストを実現している。オンプレミスであれば、それぞれの拠点に24時間体制のon-callスタッフの配置や余剰ストレージの確保が必要になるが、AWSを活⽤することで、スタッフのうち 95パーセント が 新しいプロダクトの開発 を⾏っている。AWSは我々を、プラットフォームのイノベーションおよびお客様の課題解決へと向かわせてくれている。

Example: Enabling Real Time Bidding

Advertiser Solutions

https://aws.amazon.com/jp/solutions/case-studies/adroll-tco/#AWSAdTechJP

Example: RTB Data Collection

Over 600億 events/day

ü データ集計のレイテンシは秒単位へü ⼀⽇約150TBのデータを保存

#AWSAdTechJP

Big Data• デジタルマーケティングビジネスにおいてはデータが全

て - 競争優位性をもたらすもの• 誰もが注⼒している分野であるが、今なお、そこにお⾦

を使い過ぎてしまいがちである• 最近のAWSのお客さまでのトレンド– Apache Spark– Druid– Analytics on Streaming Data

#AWSAdTechJP

Building a Real-Time Bidding Platform on AWS

https://d0.awsstatic.com/whitepapers/Building_a_Real_Time_Bidding_Platform_on_AWS_v1_Final.pdf#AWSAdTechJP

• ⽇本語の要約

http://www.slideshare.net/shinodogg/building-a-realtime-bidding-platform-on-aws-awsadtechjp

Building a Real-Time Bidding Platform on AWS

#AWSAdTechJP

• Analysis Traffic Ingestion and Processing– From Amazon Kinesis data is typically moved into a durable

repository like Amazon S3 and processed with frameworks like Apache Spark (using Spark Streaming and Kinesis integration)

• Durable Data Repository for Long-Term Storage– Amazon Elastic MapReduce (EMR) is a managed cluster compute

frameworkthat can natively read directly from Amazon S3 utilizing open source tools such as Apache Spark

• RTB Analytics Platform– In the machine learning space for very large data sets, a

common pattern is to use the machine learning library that comes with Spark MLlib on EMR

Building a Real-Time Bidding Platform on AWS

#AWSAdTechJP

Amazon Web Services

AZ AZ AZ

Durable, highly consistent storage replicates dataacross three data centers (availability zones)

Aggregate andarchive to S3

Millions ofsources producing100s of terabytes

per hour

FrontEnd

AuthenticationAuthorization

Ordered streamof events supportsmultiple readers

Real-timedashboardsand alarms

Machine learningalgorithms or

sliding windowanalytics

Aggregate analysisin Hadoop or a

data warehouse

Inexpensive: $0.028 per million puts

Real-Time Streaming Data Ingestion

Custom-built Streaming Applications(KCL)Inexpensive: $0.014 per 1,000,000 PUT Payload Units

Storage - Amazon Kinesis Streams

Kinesis Stream1 Shard< 1MB-in / 2MB-outEach record < 1 MBPutRecords() < 500 (5MB)Increased retention 7 days

#AWSAdTechJP

Processing - Spark Streaming

RECEIVERS

Input Data Streams

SPARK Job

処理結果はDestinationにPublish

DStream

RDD = Resilient Distributed DatasetDStream = Collection of RDDs

#AWSAdTechJP

Spark Steaming – Long Running Spark App

Driver Program

StreamingContext

SparkContext

Spark jobs toprocess

received data

Worker NodeExecutor

Long Task Receiver

Worker NodeExecutor

Task Task Task

Input Stream

Worker Nodeがデータのプロセッシング

Output Batch

#AWSAdTechJP

Solution Example: Druid + Sparkü 今やデファクトになりつつある Apache Sparkü Druidはまだpopularではないが、アドテクのリー

ディングカンパニーでは徐々に浸透中

Druid はApache Sparkと⼀緒に使うことができる、リアルタイムなOLTP(オンライン分析処理)エンジン

Youtubeにある講演動画などを⾒ると英語の場合”ドゥルード”と発⾳

#AWSAdTechJP

Druid + Spark Solution Technology

• クエリパフォーマンス向上• DruidのインデックスはRDDを

元に作られるため、Sparkはそのまま使⽤可能

• 既存BIツール等からのクエリに関しても、SparklineDataというOSSツールを使うことでクエリをrewriteしてDruidにリダイレクトさせる

https://www.linkedin.com/pulse/combining-druid-spark-interactive-flexible-analytics-scale-butani#AWSAdTechJP

Druid + Spark Solution Technology • Druid vs Spark

– Druid と Spark は補完的な関係– Druid は Spark の OLAP queries を加速させることができる– メモリ上のRDDは何度もアクセスするのに有⽤だが、Spark SQLは

Hadoopと同様に低レイテンシなインタラクティブなクエリを想定していない

– Druidはextremely low latency queriesにフォーカスしていて、何千⼈ものユーザーがインタラクティブにデータを探索するようなユースケースに主眼を置いている

– 典型的な利⽤例はSparkで⼤量のデータを処理して、⾼速アクセスのためにそのデータをDruidにロードする、というものである

http://druid.io/docs/latest/comparisons/druid-vs-spark.html#AWSAdTechJP

AWS Digital Advertising Customers

#AWSAdTechJP

RTB Elasticity for Traffic Volume Changes

• 時間帯や季節によってもトラフィック量は異なる• いつ⼤規模なトラフィックを発⽣させるイベントが起こるか予測不可能

#AWSAdTechJP

Where is the Non Differentiated Heavy Lifting?

Customer Manages

All-On Prem RTB

colo with Exchange S3,

Networking EC2

S3, Networking

EC2

S3, Networking

EC2

ASG, ELBDynamoDB

ASG, ELBDynamoDB

ManageAdminister

Algo, ML

#AWSAdTechJP

AWS Ad Techユーザーのトレンド• Optimization of EC2 for networking• 最新HVM AMIでsingle root I/O virtualization(SR-IOV)

• HTTP Persistent Connectionsの有効化(HTTP Keep-Alive)• Developerからのフィードバック– older: C/C++, Java, Erlang– newer: Node.js, Python, Scala

• Bidderはモジュール化を進めていて, dockerizedされている• トラフィックが増えてきたら特定のExchangeとの接続⽤に

ELBとAutoScalingGroupを分ける

#AWSAdTechJP

Reducing Costs Everywhere

何万ドルもコストを削減しています。それは⽉のAWS請求額の20%〜30%におよびます。

Gal Aviv Research & Development Group Manager

• 100台のReservedインスタンス + 800台のSpotインスタンス• パートナー: Spotinst

#AWSAdTechJP

Amazon EC2 –Amazon EC2スポットコンソールがスポットフリートとスポットブロックをサポート• 再設計されたEC2 スポットリクエストコンソールを導⼊• スポットフリートとスポットブロックをサポートし、

スポットインスタンスを使⽤する⽅法を合理化する• スポットブロックは利⽤者のジョブが完了するまでに中断されることを避

けるために、1度に1〜6時間のAmazon EC2インスタンスを要求することが可能

• スポットフリートは必要なvCPUの数を選択、⾃動的にリクエストし、最低価格でスポットインスタンスを起動し、希望容量を維持することで⼊札を簡素化する

#AWSAdTechJPhttps://aws.amazon.com/about-aws/whats-new/2016/06/new-amazon-ec2-spot-console-now-supports-spot-fleet-and-spot-blocks/

Amazon EC2Spot fleet & Spot block

https://aws.amazon.com/about-aws/whats-new/2016/06/new-amazon-ec2-spot-console-now-supports-spot-fleet-and-spot-blocks/#AWSAdTechJP

AutoScaling w/ On-demand x Spot

http://www.slideshare.net/AmazonWebServicesJapan/aws-black-belt-tech-2015-amazon-ec2-auto-scaling

① ②

③ ④

#AWSAdTechJP

Solution Example: Ad Exchanges Outside AWS

36

EquinixAdIX

AWSユーザー様

Ad ExchangeProvider

Ad ExchangeProvider

Ad ExchangeProvider

EquinixAdIX Ad Exchange

Provider

Ad ExchangeProvider

Ad ExchangeProvider

バージニア

ニューヨーク

DXパートナー:・Channel on NNI (<1GB) or・Dedicated port (>1GB)

Private IP

Public IP

Public IP

DXパートナー

DXパートナー

インターネット経由と⽐べて25%のネットワークレイテンシの軽減を実現し、安定した接続を実現した事例

#AWSAdTechJP

Solution Example: Ad Exchanges Outside AWS

37

http://www.equinix.com/industries/advertising/interconnection/#AWSAdTechJP

AWS Ad Tech in Korea• Buzzvil: Ad Network

– EC2, ELB, RDS, S3 でスモールスタート– その後Auto Scaling, CloudFront, Lambda, DynamoDB, Kinesis等を活⽤

#AWSAdTechJPhttp://blog.buzzvil.com/2015/11/06버즈빌-aws-활용기/

AWS Ad Tech in Korea• IGAWorks: DMP

– AWSマネージドサービスを活⽤しモダンな構成に

#AWSAdTechJPhttps://aws.amazon.com/ko/solutions/case-studies/IGAWorks/

AWS Ad Tech in Korea• IGAWorks: DMP

– re:Invent 2015に登壇 - (DAT202) Managed Database Options on AWS

https://www.youtube.com/watch?v=-F3Y68_RfWQ#AWSAdTechJP

AWS Ad Tech in Korea

https://www.youtube.com/watch?v=-F3Y68_RfWQ

⽇本のアドテク企業様からも、このようなグローバルな場で事例を出して、

よりプレゼンスを⾼めていただければ幸いです!

• IGAWorks: DMP– re:Invent 2015に登壇 - (DAT202) Managed Database Options on AWS

#AWSAdTechJP

AWS Korea Ad Tech team

• お隣韓国のAdTech担当とイベント共催の計画等をしています– 韓国での登壇や事例紹介にご興味があれば是⾮お声がけく

ださい!

#AWSAdTechJP

もちろん⽇本でも!!• 沢⼭のAWS事例を集めて業界全体を盛り上げると共に、グローバル展

開のお⼿伝いもさせていただきたいと考えております!

http://www.awsmicrosite.jp/adtech/case-studies/index.html#AWSAdTechJP

#AWSAdTechJP