17. Ad Request come in.Look up video from RAM.3".? Video in mem, return response3.? Video not it mem, redirect to /ax/ interfaceAsync look up video from cache.5,6: Query memcached for Video. the result might be:?? a).NULL,?? b). Hit but data is loading by some adserver?? c). Hit and data available7". Return response.7.? if cache missing, then return.8. Set Video with status = loading9. Invoke a thread fetch video from oltp DB.10, 11. Query video and ge result from DB12,13.? Set Video with status = available and data in both cache and mem.
26. Long tail roll up & Data Availability一个简单的计算: 100,000 video X 100 site X 100 Country X 1,000 Ad = 1,000,000,000,000 行/天,Impossible!互联网视频的访问热度呈现典型“长尾”分布5%的热门视频占有50%的流量在所有视频上统计所有维度/粒度的指标,ROI太低Long Tail Roll up对单日小于某一阈值流量的video在DB中roll up成一个item创建Long tail表单独对长尾视频做粗粒度统计Data Availability对不需要某些粒度指标的客户不统计相关维度产物功能设计需谨慎,一旦发布很难收回,从而带来维护负担
36. 运营原则——50% 上限 & N+1 Data Center所有子系统做容量扩展规划时,预估上限以50%负载(经验值)为限。Adserver为峰值预留50%容量,e.g突发新闻,世界杯决赛后台日志处理在用户要求的数据发布时间50%内完成,有机会应对意外出错重做一遍。业务量上涨导致系统平均负载>50%,扩容的信号!N+1 Data Center数据中心不同地理位置分布备用ISP,备用CDN保证一个DC由于意外服务中断,其他N个可正常负载服务。
45. 对于分布式系统和Web服务扩展相关链接BlogsNatiShalom's Blog: Discussions about middleware and distributed technologieshttp://natishalom.typepad.com/nati_shaloms_blog/All Things Distributed: Werner Vogels' weblog on building scalable and robust distributed systems.http://www.allthingsdistributed.com/High Scalability: Building bigger, faster, more reliable websiteshttp://highscalability.com/ProductionScale: Information Technology, Scalability, Technology Operations, and Cloud Computinghttp://www.productionscale.com/iamcal.comhttp://www.iamcal.com/ (the "talks" section is particularly interesting)Kitchen Soap: Thoughts on capacity planning and web operationshttp://www.kitchensoap.com/MySQL Performance Blog: Everything about MySQL Performancehttp://www.mysqlperformanceblog.com/
46. PresentationsScalable Internet Architectureshttp://www.slideshare.net/shiflett/scalable-internet-architecturesHow to build the Webhttp://www.slideshare.net/simon/how-to-build-the-webNetlog: What we learned about scalability & high availabilityhttp://www.slideshare.net/folke/netlog-what-we-learned-about-scalability-high-availability-430211Database Sharding at Netloghttp://www.slideshare.net/oemebamo/database-sharding-at-netlog-presentationMySQL 2007 Techn At Digg V3http://www.slideshare.net/epee/mysql-2007-tech-at-digg-v3Flickr and PHPhttp://www.slideshare.net/coolpics/flickr-44054Scalable Web Architectures: Common Patterns and Approacheshttp://www.slideshare.net/techdude/scalable-web-architectures-common-patterns-and-approachesHow to scale your web apphttp://www.slideshare.net/Georgio_1999/how-to-scale-your-web-appGoogle Cluster Innardshttp://www.slideshare.net/ultradvorka/google-cluster-innardsSharding Architectureshttp://www.slideshare.net/guest0e6d5e/sharding-architectures