- 浏览: 223505 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
Breather.杨:
斯库伊!受教
基于按annotation的hibernate主键生成策略 -
w420372197:
很详细,学习中..转载了
基于按annotation的hibernate主键生成策略 -
wslovenide:
...
基于按annotation的hibernate主键生成策略 -
Navee:
写的十分详细!感谢
基于按annotation的hibernate主键生成策略 -
eric.cheng:
很好,学习了
基于按annotation的hibernate主键生成策略
YouTube Architecture
Thu, 03/13/2008 - 05:54 — Todd Hoff
Update: YouTube: The Platform . YouTube adds a new rich set of APIs in order to become your video platform leader--all for free. Upload, edit, watch, search, and comment on video from your own site without visiting YouTube. Compose your site internally from APIs because you'll need to expose them later anyway.
YouTube grew incredibly fast, to over 100 million video views per day, with only a handful of people responsible for scaling the site. How did they manage to deliver all that video to all those users? And how have they evolved since being acquired by Google?
Information Sources
Platform
What's Inside?
The Stats
Recipe for handling rapid growth
while (true)
{
identify_and_fix_bottlenecks();
drink();
sleep();
notice_new_bottleneck();
}
This loop runs many times a day.
Web Servers
Video Serving
- More disks serving content which means more speed.
- Headroom. If a machine goes down others can take over.
- There are online backups.
- Apache had too much overhead.
- Uses epoll to wait on multiple fds.
- Switched from single process to multiple process configuration to handle more connections.
- CDNs replicate content in multiple places. There's a better chance of content being closer to the user, with fewer hops, and content will run over a more friendly network.
- CDN machines mostly serve out of memory because the content is so popular there's little thrashing of content into and out of memory.
- There's a long tail effect. A video may have a few plays, but lots of videos are being played. Random disks blocks are being accessed.
- Caching doesn't do a lot of good in this scenario, so spending money on more cache may not make sense. This is a very interesting point. If you have a long tail product caching won't always be your performance savior.
- Tune RAID controller and pay attention to other lower level issues to help.
- Tune memory on each machine so there's not too much and not too little.
Serving Video Key Points
Serving Thumbnails
- Lots of disk seeks and problems with inode caches and page caches at OS level.
- Ran into per directory file limit. Ext3 in particular. Moved to a more hierarchical structure. Recent improvements in the 2.6 kernel may improve Ext3 large directory handling up to 100 times , yet storing lots of files in a file system is still not a good idea.
- A high number of requests/sec as web pages can display 60 thumbnails on page.
- Under such high loads Apache performed badly.
- Used squid (reverse proxy) in front of Apache. This worked for a while, but as load increased performance eventually decreased. Went from 300 requests/second to 20.
- Tried using lighttpd but with a single threaded it stalled. Run into problems with multiprocesses mode because they would each keep a separate cache.
- With so many images setting up a new machine took over 24 hours.
- Rebooting machine took 6-10 hours for cache to warm up to not go to disk.
- Avoids small file problem because it clumps files together.
- Fast, fault tolerant. Assumes its working on a unreliable network.
- Lower latency because it uses a distributed multilevel cache. This cache works across different collocation sites.
- For more information on BigTable take a look at Google Architecture , GoogleTalk Architecture , and BigTable .
Databases
- Use MySQL to store meta data like users, tags, and descriptions.
- Served data off a monolithic RAID 10 Volume with 10 disks.
- Living off credit cards so they leased hardware. When they needed more hardware to handle load it took a few days to order and get delivered.
- They went through a common evolution: single server, went to a single master with multiple read slaves, then partitioned the database, and then settled on a sharding approach.
- Suffered from replica lag. The master is multi-threaded and runs on a large machine so it can handle a lot of work. Slaves are single threaded and usually run on lesser machines and replication is asynchronous, so the slaves can lag significantly behind the master.
- Updates cause cache misses which goes to disk where slow I/O causes slow replication.
- Using a replicating architecture you need to spend a lot of money for incremental bits of write performance.
- One of their solutions was prioritize traffic by splitting the data into two clusters: a video watch pool and a general cluster. The idea is that people want to watch video so that function should get the most resources. The social networking features of YouTube are less important so they can be routed to a less capable cluster.
- Went to database partitioning.
- Split into shards with users assigned to different shards.
- Spreads writes and reads.
- Much better cache locality which means less IO.
- Resulted in a 30% hardware reduction.
- Reduced replica lag to 0.
- Can now scale database almost arbitrarily.
Data Center Strategy
looks at different metrics to know who is closest.
Lessons Learned
- Software: DB, caching
- OS: disk I/O
- Hardware: memory, RAID
发表评论
-
大型网站架构不得不考虑的10个问题
2009-01-16 14:41 1155大型网站架构不得不考虑的10个问题 来自CSDN:http:/ ... -
规划 SOA 参考架构
2009-01-07 16:22 2478规划 SOA 参考架构 2007-12-03 09: ... -
架构师书单
2009-01-07 16:09 1720架构师书单 一、S ... -
架构师之路
2009-01-07 16:07 5132架构师之路 什么是软件架构师? 架构 ... -
应用架构选型讨论
2008-12-10 09:29 1225应用架构选型讨论(PPT) ... -
系统构架设计应考虑的因素
2008-11-24 17:23 3249系统构架设计应考虑的 ... -
负载均衡--大型在线系统实现的关键(服务器集群架构的设计与选择)
2008-11-24 17:19 5720负载均衡--大型在 ... -
LinkedIn Architecture
2008-11-24 16:16 1617LinkedIn Architecture Category ... -
eBay Architecture
2008-11-24 16:14 1944eBay Architecture Tue, 05/27/2 ... -
LiveJournal Architecture
2008-11-24 16:13 1098LiveJournal Architecture Mon, ... -
Google Architecture
2008-11-24 16:09 1312Google Architecture Sun, 11/23 ... -
Flickr Architecture
2008-11-24 16:05 1335Flickr Architecture Wed, 11/14 ... -
Digg Architecture
2008-11-24 16:03 1303Digg Architecture Mon, 09/15/2 ... -
37signals Architecture
2008-11-24 16:02 118937signals Architecture Thu, 09 ... -
Scaling Twitter: Making Twitter 10000 Percent Fast
2008-11-24 15:59 1294Scaling Twitter: Making Twitter ... -
Amazon Architecture
2008-11-24 15:58 1217Amazon Architecture Tue, 09/18 ... -
Facebook 海量数据处理
2008-11-24 15:54 1855Facebook 海量数据处理 作者: F ... -
Scalability Best Practices: Lessons from eBay
2008-11-24 15:50 1152Scalability Best Practices: Le ... -
Yapache-Yahoo! Apache 的秘密
2008-11-24 02:15 1194Yapache-Yahoo! Apache 的秘密 作 ... -
Notes from Scaling MySQL - Up or Out
2008-11-24 02:14 1503Notes from Scaling MySQL - Up o ...
相关推荐
YouTube Architecture.pdf
YouTube Architecture 253 Information Sources 254 Platform 254 What's Inside? 254 The Stats 254 Recipe for handling rapid growth 255 Web Servers 255 Video Serving 256 Serving Video Key ...
YouTube技术架构详解,包括被google收购前及收购后的架构。
APVideoPlayer Simple and clean architecture of android YouTube video player with google sign-in and full screen.
This is a sample app demonstrating Youtube UX/UI animation using ConstraintLayout.It implements the Keyframe Animation feature in ConstrainLayout.This sample app is built on Android Architecture ...
Quiz-App是一个由Caio和Mike在YouTube系列节目中逐步构建的iOS应用程序,它不仅是一个实用的问答应用,还是一个展示如何运用Swift语言、测试驱动开发(TDD)以及Clean Architecture原则的优秀示例。下面我们将深入...
CUDA速成课程是针对GPU编程技术的一套学习资源,由CoffeeBeforeArch在YouTube上推出的系列教程。CUDA(Compute Unified Device Architecture)是由NVIDIA开发的一种并行计算平台和编程模型,它允许开发者利用图形...
这些文档分别来自于eBay、YouTube、Facebook、淘宝、豆瓣、亚马逊和谷歌,涵盖了各大公司在不同时间点的架构设计和实践经验。这些公司都是互联网行业的巨头,它们的架构设计对整个行业有着深远的影响。以下是对这些...
RealtimeDatabase-使用MVVM的干净架构。 这是一个以Kotlin为基础的应用程序构建,以示例为例,展示了如何使用三种不同的方法显示数据。 第一种方法使用回调,第二种方法使用称为... 在youtube上也可以看到:即将推出。
Youtube8m, and more. You will not only learn about the different mobile and embedded platforms supported by TensorFlow but also how to set up cloud platforms for deep learning applications. Get a ...
You will learn the performance of different DNNs on some popularly used data sets such as MNIST, CIFAR-10, Youtube8m, and more. You will not only learn about the different mobile and embedded ...
神经元网络入门视频——来源于Youtube 包括: 视频1——Data and Architecture 视频2——Forward Propagation 视频3——Gradient Descent 视频4——Backpropagation 视频5——Numerical Gradient Checking ...
:eyes:我对使用Lambda Architecture设计端到端的管道和数据转换项目感兴趣,该Lambda Architecture概括了由大数据工具组成的Streaming Micro Batching和Batching系统。 :seedling:我目前正在学习 :closed_mailbox...
搜索远程作业 搜索远程作业应用程序是一个Android应用程序,您可以在其中可以在任何地方的所有字段中搜索远程作业, 您可以轻松地搜索您的字段, 您将找到所有最新的远程作业,也可以申请直接从应用程序中找到工作。...
"STAIR Hardware and Software Architecture.pdf"可能讨论的是一个具体项目(如STAIR)的硬件和软件架构,其中可能包括Bumblebee2在系统中的集成和数据处理流程。 这些资料的结合,不仅提供了Bumblebee2的基础知识...
他们参考了Peng Wu的演讲"Unlocking JavaScript V8 on RISC-V"(可在YouTube观看)以及PLCT实验室的报告"V8 for RISCV, where to come and where to go"(GitHub链接)。这个过程涉及到大量工作,包括理解V8引擎的...
在Java编程语言中,"CiphersInJava"项目是一个用于理解和实现加密算法的开源资源,主要面向YouTube(YT)频道的编程教学。这个项目提供的源代码涵盖了多种密码学中的加密和解密方法,有助于开发者深入学习和应用这些...