SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Large Scale Video Monetization
                                   海量视频⼲⼴广告分发的挑战
                                                                杜嵩 sdu@freewheel.tv
                                                                  Arch Summit 2012
© FreeWheel 2012 SILICON VALLEY • NEW YORK • BEIJING • LONDON
关于 FreeWheel

• FreeWheel 提供对版权数字内容进⾏行价值管理的全⾯面解决⽅方案
• 服务于美国市场超过1/3视频⼲⼴广告流量,90%的领先视频⺴⽹网站为
  FreeWheel的客户或合作伙伴*
• ⽀支持数⼗十种平台和设备上的版权数字视频播放和⼲⼴广告管理,并为世界
  杯、奥运会等⾼高访问量项⺫⽬目提供实时视频⼲⼴广告决策与统计分析。




 * 统计数字基于2011 Q4 ComScore 和 FreeWheel 数据



                                           Confidential
                                                         2
寻找体现内容最⼤大价值的⽅方程式
    $ ./adserver --start
视频产业的独特挑战 - 复杂的⽣生态链
                ⼲⼴广告商          内容拥有者

• 多⽅方业务整合
• 多变的⼲⼴广告投放策略
• 不同流量模式的分发渠道
                  版权拥有及运营⽅方      分发渠道
• 完整数据报表和分析
• 灵活的第三⽅方集成


                分销商

                              第三⽅方平台




                                  Confidential
视频产业的独特挑战 - 多维度的⼲⼴广告形式和播放体验


• 视频内的线性(前后贴⽚片、中插与暂停)和⾮非线性(悬浮)
⼲⼴广告、⻚页⾯面展⽰示⼲⼴广告及其组合




• 来⾃自⼲⼴广告主(投放频次、区域与独占要求)、最终⽤用户(频
次控制、视觉优化)、监管机构(分级、提⽰示)的不同⾓角度
的要求

                             Confidential
技术堆栈


                                    Ruby on Rails
                          B2B UI



                                                       C++
                                              Forecasting

 Ruby on          MySQL
  Rails

API        OLTP              OLAP                       C++
                                                Ad Server            SDK

                                                               Flash, iOS, …


                                               C++ / Java
                                    Backend


                                                              Confidential
B2B UI 架构


     Module                            Module                             Module
     Resources                         Resources                          Resources
       Biz Logic                         Biz Logic                          Biz Logic
 C                              C                                   C
                      A                                  A                                      A
 O                              O                                   O
     View/Helper      P               View/Helper        P                View/Helper           P
 N                              N                                   N
                      I                                  I                                      I
 F    Controller                F       Controller                  F      Controller
       Model                             Model                              Model




                                    Shared Library
       SSO         User Permission      System API (Search, i18n, …)            Tasks
      Shared Model        Controller/Dispatcher      View/Helper          BizLogic
           Shared 3rd Plugins            Components                Shared Resources




                                                                                     Confidential
                                                                                                    7
平滑处理流量
$ netstat -na
B2C服务集群的架构设计




                     GSLB (NetScaler)

       Lighttpd             Lighttpd         Lighttpd



                                                                        MMAP
                                                                        Dump


                                                                                   OLTP


     Counter Server
                                                                      Memcached
     Counter Client         Counter Client         Counter Client

       Ad Server 1            Ad Server 2               Ad Server n




                        Binary Logs (




                                                                                  Confidential
                                                                                                9
为动态请求的峰值流量作好准备


• 基础设施
• 设计冗余
 • 服务端负载 - 50%
 • 客户端容许延迟
• 彩排!
• ⼤大量、稳定的⽇日常流量
• 静态化?




                 Confidential
                               10
保证全球服务的⾼高可⽤用性
    $ uptime
B2C服务集群的分布




                                       Data Service

           150Mbps, 90ms rtt
                                                       1Gbps, 69ms rtt

                                     1Gbps, <1ms rtt

   USWest ads
     cluster                                 USEast1 ads
                                               cluster
                                                                         UK ads
                                                                         cluster

                               USEast2 ads
                                 cluster




                                                                                   Confidential
Failure is a feature


 • 消灭单点故障
   • 可独⽴立运⾏行的集群
   • 可离线运⾏行的服务实例
 • 总是异步
 • 断线、重连与最终同步




                       Confidential
                                     13
实时数据透视与多维度报表
  $ tail -f adserver.log
多层次的数据服务


• ⽇日志导出
• 定期报表
• 实时报表
• 预测
• BI分析




           Confidential
                         15
实时报表服务的架构设计

• ZeroMQ for log transporting
• LevelDB for log matching
• Redis/MongoDB as Realtime Counters
• UI: JQuery + Highcharts + Google Map API
               Ad             MQ Servers           RT-Reporting
             server                                  Servers

                                                           RT-
   Bin/Ack                                   Processor
                                                         Counter?
     Logs
                 LogTailer/                  Processor   MongoDB
                 LogSend         LogServer                  ?         RT-UI
                                             Processor
   Debug            er                                   Historical
    Logs                                                   Data
                                             Processor
                                                          Store?




                                                                      OLTP



                                                                              Confidential
接⼊入异构平台和终端
$ ftpd ; crond ; xcodebuild ; adb push
多样化的接⼊入是发展趋势




               Confidential
                             18
优良的API⽤用户体验有助于快速⼲⼴广泛的业务集成




                            Confidential
                                          19
API的基础:可插接的数据访问层


• 建⽴立⼀一致的内部数据层
  • API术语
  • API数据规范
• 维护兼容性
  • 迁移成本的考量



  通⽤用      API              API     客户端
客户端集成    (Ruby)            (C++)    SDK      第三⽅方
                   内部数据层                     客户端
特定第三⽅方    导⼊入器               API              集成
服务端集成     (Ruby)           (XSLT)

                                          Confidential
                                                        20
回顾
$ history | grep key
回顾

• adserver --start
  • 寻找体现内容最⼤大价值的⽅方程式
    • 可扩展的核⼼心架构:处理复杂多变业务逻辑
• netstat -na
  • 平滑处理流量冲击
    • 从链路层开始;⾼高峰流量的特质;冗余
• uptime
  • 保证全球数据中⼼心的⾼高可⽤用性
    • 没有单点、总是异步、最终同步
• tail -f adserver.log
  • 实现亚分钟级数据透视与多维度商业智能报表
    • 实时⽇日志处理框架
• ftpd ; crond ; xcodebuild ; adb push
  • 接⼊入产业链上下游的异构平台和设备
    • 开放数据架构、注重API的⽤用户体验


                                         Confidential
                                                       22
变化总在发⽣生


• 设计
 • 与产品团队合作:好的产品设计应该是可扩展、可重⽤用的
• 重构
 • 定期回顾流量结构和活跃的业务模式
• 透视
 • 建⽴立快速诊断问题和容易发现趋势的⼯工具




                                Confidential
                                              23
Thank You!




             Confidential

Contenu connexe

En vedette

02s0102基于rails的大型b2 b系统架构优化 于冰赵晓锋
02s0102基于rails的大型b2 b系统架构优化   于冰赵晓锋02s0102基于rails的大型b2 b系统架构优化   于冰赵晓锋
02s0102基于rails的大型b2 b系统架构优化 于冰赵晓锋jackdong
 
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011Gerd Leonhard
 
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...Petit Web
 
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...Petit Web
 
freewheel mechanism ppt by pradeep samal nitrr
freewheel mechanism ppt by pradeep samal nitrrfreewheel mechanism ppt by pradeep samal nitrr
freewheel mechanism ppt by pradeep samal nitrrpradeepsamal
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理Kay Yan
 
FREEWHEEL 2027 Startup Pitch Deck
FREEWHEEL 2027 Startup Pitch DeckFREEWHEEL 2027 Startup Pitch Deck
FREEWHEEL 2027 Startup Pitch DeckCarrot Creative
 
OTT & The Future of Connected TV
OTT & The Future of Connected TVOTT & The Future of Connected TV
OTT & The Future of Connected TVClearbridge Mobile
 

En vedette (9)

The Power of Television
The Power of TelevisionThe Power of Television
The Power of Television
 
02s0102基于rails的大型b2 b系统架构优化 于冰赵晓锋
02s0102基于rails的大型b2 b系统架构优化   于冰赵晓锋02s0102基于rails的大型b2 b系统架构优化   于冰赵晓锋
02s0102基于rails的大型b2 b系统架构优化 于冰赵晓锋
 
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011
Future of Connected Television Gerd Leonhard @ MIPCOM Digital Minds 2011
 
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation TF1...
 
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...
Grand Format "Jardins Ouverts, Jardins Clos" du 28/02/2017 - Présentation Fre...
 
freewheel mechanism ppt by pradeep samal nitrr
freewheel mechanism ppt by pradeep samal nitrrfreewheel mechanism ppt by pradeep samal nitrr
freewheel mechanism ppt by pradeep samal nitrr
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
 
FREEWHEEL 2027 Startup Pitch Deck
FREEWHEEL 2027 Startup Pitch DeckFREEWHEEL 2027 Startup Pitch Deck
FREEWHEEL 2027 Startup Pitch Deck
 
OTT & The Future of Connected TV
OTT & The Future of Connected TVOTT & The Future of Connected TV
OTT & The Future of Connected TV
 

Similaire à 杜嵩 Arch summit2012 dusong@freewheel

网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维guiyingshenxia
 
网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维colderboy17
 
Alibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconAlibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconYiwei Ma
 
Practices of equipment communication v1.0
Practices of equipment communication v1.0Practices of equipment communication v1.0
Practices of equipment communication v1.0yaohung
 
Introduction to ngn sce
Introduction to ngn sceIntroduction to ngn sce
Introduction to ngn scegdems
 
数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011Yiwei Ma
 
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境drewz lin
 
Top100summit 互联网发布与实验体系建设
Top100summit 互联网发布与实验体系建设 Top100summit 互联网发布与实验体系建设
Top100summit 互联网发布与实验体系建设 drewz lin
 
张松国 腾讯微博架构介绍08
张松国 腾讯微博架构介绍08张松国 腾讯微博架构介绍08
张松国 腾讯微博架构介绍08drewz lin
 
Ibm solid db overview v6.3 20090320
Ibm solid db overview v6.3 20090320Ibm solid db overview v6.3 20090320
Ibm solid db overview v6.3 20090320小新 制造
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure National Cheng Kung University
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvementsXinchen Hui
 
CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)CollabNet
 
Web logic platform 8.1
Web logic platform 8.1Web logic platform 8.1
Web logic platform 8.1williams2014
 
阿里巴巴运维团队的无状态运维思路
阿里巴巴运维团队的无状态运维思路阿里巴巴运维团队的无状态运维思路
阿里巴巴运维团队的无状态运维思路mysqlops
 
Autotask 简介
Autotask 简介Autotask 简介
Autotask 简介down123
 
E tom ngoss规范及siebel系统在电信行业的应用 陈永林
E tom ngoss规范及siebel系统在电信行业的应用 陈永林E tom ngoss规范及siebel系统在电信行业的应用 陈永林
E tom ngoss规范及siebel系统在电信行业的应用 陈永林corlin chen
 
未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇Yao-Wei Ou
 
3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)Ufo Qiao
 

Similaire à 杜嵩 Arch summit2012 dusong@freewheel (20)

网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维
 
网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维网易 李弈远 网易服务集成框架的构建与运维
网易 李弈远 网易服务集成框架的构建与运维
 
Alibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconAlibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qcon
 
Practices of equipment communication v1.0
Practices of equipment communication v1.0Practices of equipment communication v1.0
Practices of equipment communication v1.0
 
Introduction to ngn sce
Introduction to ngn sceIntroduction to ngn sce
Introduction to ngn sce
 
数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011
 
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境
Top100summit 腾讯-周健-服务化与体系化解决大量定制小项目开发困境
 
Top100summit 互联网发布与实验体系建设
Top100summit 互联网发布与实验体系建设 Top100summit 互联网发布与实验体系建设
Top100summit 互联网发布与实验体系建设
 
张松国 腾讯微博架构介绍08
张松国 腾讯微博架构介绍08张松国 腾讯微博架构介绍08
张松国 腾讯微博架构介绍08
 
Ibm solid db overview v6.3 20090320
Ibm solid db overview v6.3 20090320Ibm solid db overview v6.3 20090320
Ibm solid db overview v6.3 20090320
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvements
 
CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)
 
Web logic platform 8.1
Web logic platform 8.1Web logic platform 8.1
Web logic platform 8.1
 
阿里巴巴运维团队的无状态运维思路
阿里巴巴运维团队的无状态运维思路阿里巴巴运维团队的无状态运维思路
阿里巴巴运维团队的无状态运维思路
 
Autotask 简介
Autotask 简介Autotask 简介
Autotask 简介
 
E tom ngoss规范及siebel系统在电信行业的应用 陈永林
E tom ngoss规范及siebel系统在电信行业的应用 陈永林E tom ngoss规范及siebel系统在电信行业的应用 陈永林
E tom ngoss规范及siebel系统在电信行业的应用 陈永林
 
未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇
 
Cdc@ganji.com
Cdc@ganji.comCdc@ganji.com
Cdc@ganji.com
 
3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)
 

Plus de drewz lin

Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearydrewz lin
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013drewz lin
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13drewz lin
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrichdrewz lin
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2drewz lin
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2drewz lin
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfdrewz lin
 
Csrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equalCsrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equaldrewz lin
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21drewz lin
 
Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansendrewz lin
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaoladrewz lin
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsdrewz lin
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentationdrewz lin
 
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsdrewz lin
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martindrewz lin
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowaspdrewz lin
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usadrewz lin
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013drewz lin
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架drewz lin
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈drewz lin
 

Plus de drewz lin (20)

Web security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-kearyWeb security-–-everything-we-know-is-wrong-eoin-keary
Web security-–-everything-we-know-is-wrong-eoin-keary
 
Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013Via forensics appsecusa-nov-2013
Via forensics appsecusa-nov-2013
 
Phu appsec13
Phu appsec13Phu appsec13
Phu appsec13
 
Owasp2013 johannesullrich
Owasp2013 johannesullrichOwasp2013 johannesullrich
Owasp2013 johannesullrich
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2
 
I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2I mas appsecusa-nov13-v2
I mas appsecusa-nov13-v2
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolfDefeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
 
Csrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equalCsrf not-all-defenses-are-created-equal
Csrf not-all-defenses-are-created-equal
 
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
Chuck willis-owaspbwa-beyond-1.0-app secusa-2013-11-21
 
Appsec usa roberthansen
Appsec usa roberthansenAppsec usa roberthansen
Appsec usa roberthansen
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaola
 
Appsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_editsAppsec2013 presentation-dickson final-with_all_final_edits
Appsec2013 presentation-dickson final-with_all_final_edits
 
Appsec2013 presentation
Appsec2013 presentationAppsec2013 presentation
Appsec2013 presentation
 
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitationsAppsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
Appsec 2013-krehel-ondrej-forensic-investigations-of-web-exploitations
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martin
 
Amol scadaowasp
Amol scadaowaspAmol scadaowasp
Amol scadaowasp
 
Agile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usaAgile sdlc-v1.1-owasp-app sec-usa
Agile sdlc-v1.1-owasp-app sec-usa
 
Vulnex app secusa2013
Vulnex app secusa2013Vulnex app secusa2013
Vulnex app secusa2013
 
基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架基于虚拟化技术的分布式软件测试框架
基于虚拟化技术的分布式软件测试框架
 
新浪微博稳定性经验谈
新浪微博稳定性经验谈新浪微博稳定性经验谈
新浪微博稳定性经验谈
 

杜嵩 Arch summit2012 dusong@freewheel

  • 1. Large Scale Video Monetization 海量视频⼲⼴广告分发的挑战 杜嵩 sdu@freewheel.tv Arch Summit 2012 © FreeWheel 2012 SILICON VALLEY • NEW YORK • BEIJING • LONDON
  • 2. 关于 FreeWheel • FreeWheel 提供对版权数字内容进⾏行价值管理的全⾯面解决⽅方案 • 服务于美国市场超过1/3视频⼲⼴广告流量,90%的领先视频⺴⽹网站为 FreeWheel的客户或合作伙伴* • ⽀支持数⼗十种平台和设备上的版权数字视频播放和⼲⼴广告管理,并为世界 杯、奥运会等⾼高访问量项⺫⽬目提供实时视频⼲⼴广告决策与统计分析。 * 统计数字基于2011 Q4 ComScore 和 FreeWheel 数据 Confidential 2
  • 4. 视频产业的独特挑战 - 复杂的⽣生态链 ⼲⼴广告商 内容拥有者 • 多⽅方业务整合 • 多变的⼲⼴广告投放策略 • 不同流量模式的分发渠道 版权拥有及运营⽅方 分发渠道 • 完整数据报表和分析 • 灵活的第三⽅方集成 分销商 第三⽅方平台 Confidential
  • 5. 视频产业的独特挑战 - 多维度的⼲⼴广告形式和播放体验 • 视频内的线性(前后贴⽚片、中插与暂停)和⾮非线性(悬浮) ⼲⼴广告、⻚页⾯面展⽰示⼲⼴广告及其组合 • 来⾃自⼲⼴广告主(投放频次、区域与独占要求)、最终⽤用户(频 次控制、视觉优化)、监管机构(分级、提⽰示)的不同⾓角度 的要求 Confidential
  • 6. 技术堆栈 Ruby on Rails B2B UI C++ Forecasting Ruby on MySQL Rails API OLTP OLAP C++ Ad Server SDK Flash, iOS, … C++ / Java Backend Confidential
  • 7. B2B UI 架构 Module Module Module Resources Resources Resources Biz Logic Biz Logic Biz Logic C C C A A A O O O View/Helper P View/Helper P View/Helper P N N N I I I F Controller F Controller F Controller Model Model Model Shared Library SSO User Permission System API (Search, i18n, …) Tasks Shared Model Controller/Dispatcher View/Helper BizLogic Shared 3rd Plugins Components Shared Resources Confidential 7
  • 9. B2C服务集群的架构设计 GSLB (NetScaler) Lighttpd Lighttpd Lighttpd MMAP Dump OLTP Counter Server Memcached Counter Client Counter Client Counter Client Ad Server 1 Ad Server 2 Ad Server n Binary Logs ( Confidential 9
  • 10. 为动态请求的峰值流量作好准备 • 基础设施 • 设计冗余 • 服务端负载 - 50% • 客户端容许延迟 • 彩排! • ⼤大量、稳定的⽇日常流量 • 静态化? Confidential 10
  • 12. B2C服务集群的分布 Data Service 150Mbps, 90ms rtt 1Gbps, 69ms rtt 1Gbps, <1ms rtt USWest ads cluster USEast1 ads cluster UK ads cluster USEast2 ads cluster Confidential
  • 13. Failure is a feature • 消灭单点故障 • 可独⽴立运⾏行的集群 • 可离线运⾏行的服务实例 • 总是异步 • 断线、重连与最终同步 Confidential 13
  • 15. 多层次的数据服务 • ⽇日志导出 • 定期报表 • 实时报表 • 预测 • BI分析 Confidential 15
  • 16. 实时报表服务的架构设计 • ZeroMQ for log transporting • LevelDB for log matching • Redis/MongoDB as Realtime Counters • UI: JQuery + Highcharts + Google Map API Ad MQ Servers RT-Reporting server Servers RT- Bin/Ack Processor Counter? Logs LogTailer/ Processor MongoDB LogSend LogServer ? RT-UI Processor Debug er Historical Logs Data Processor Store? OLTP Confidential
  • 17. 接⼊入异构平台和终端 $ ftpd ; crond ; xcodebuild ; adb push
  • 20. API的基础:可插接的数据访问层 • 建⽴立⼀一致的内部数据层 • API术语 • API数据规范 • 维护兼容性 • 迁移成本的考量 通⽤用 API API 客户端 客户端集成 (Ruby) (C++) SDK 第三⽅方 内部数据层 客户端 特定第三⽅方 导⼊入器 API 集成 服务端集成 (Ruby) (XSLT) Confidential 20
  • 21. 回顾 $ history | grep key
  • 22. 回顾 • adserver --start • 寻找体现内容最⼤大价值的⽅方程式 • 可扩展的核⼼心架构:处理复杂多变业务逻辑 • netstat -na • 平滑处理流量冲击 • 从链路层开始;⾼高峰流量的特质;冗余 • uptime • 保证全球数据中⼼心的⾼高可⽤用性 • 没有单点、总是异步、最终同步 • tail -f adserver.log • 实现亚分钟级数据透视与多维度商业智能报表 • 实时⽇日志处理框架 • ftpd ; crond ; xcodebuild ; adb push • 接⼊入产业链上下游的异构平台和设备 • 开放数据架构、注重API的⽤用户体验 Confidential 22
  • 23. 变化总在发⽣生 • 设计 • 与产品团队合作:好的产品设计应该是可扩展、可重⽤用的 • 重构 • 定期回顾流量结构和活跃的业务模式 • 透视 • 建⽴立快速诊断问题和容易发现趋势的⼯工具 Confidential 23
  • 24. Thank You! Confidential