Facebook的体系结构分析---外文转载
- Web front-end written in PHP. Facebook's HipHop Compiler [1] then converts it to C++ and compiles it using g++, thus providing a high performance templating and Web logic execution layer.
- Because of the limitations of relying entirely on static compilation, Facebook's started to work on a HipHop Interpreter [2] as well as a HipHop Virtual Machine which translate PHP code to HipHop ByteCode [3].
- Business logic is exposed as services using Thrift [4]. Some of these services are implemented in PHP, C++ or Java depending on service requirements (some other languages are probably used...)
- Services implemented in Java don't use any usual enterprise application server but rather use Facebook's custom application server. At first this can look as wheel reinvented but as these services are exposed and consumed only (or mostly) using Thrift, the overhead of Tomcat, or even Jetty, was probably too high with no significant added value for their need.
- Persistence is done using MySQL, Memcached [5], Hadoop's HBase [6]. Memcached is used as a cache for MySQL as well as a general purpose cache.
- Offline processing is done using Hadoop and Hive.
- Data such as logging, clicks and feeds transit using Scribe [7] and are aggregating and stored in HDFS using Scribe-HDFS [8], thus allowing extended analysis using MapReduce
- BigPipe [9] is their custom technology to accelerate page rendering using a pipelining logic
- Varnish Cache [10] is used for HTTP proxying. They've prefered it for its high performance and efficiency [11].
- The storage of the billions of photos posted by the users is handled by Haystack, an ad-hoc storage solution developed by Facebook which brings low level optimizations and append-only writes [12].
- Facebook Messages is using its own architecture which is notably based on infrastructure sharding and dynamic cluster management. Business logic and persistence is encapsulated in so-called 'Cell'. Each Cell handles a part of users ; new Cells can be added as popularity grows [13]. Persistence is achieved using HBase [14].
- Facebook Messages' search engine is built with an inverted index stored in HBase [15]
- Facebook Search Engine's implementation details are unknown as far as I know
- The typeahead search uses a custom storage and retrieval logic [16]
- Chat is based on an Epoll server developed in Erlang and accessed using Thrift [17]
- They've built an automated system that responds to monitoring alerts by launching the appropriated repairing workflow, or escalating to humans if the outage couldn't be overcome [18].
About the resources provisioned for each of these components, some information and numbers are known:
- Facebook is estimated to own more than 60,000 servers [18]. Their recent datacenter in Prineville, Oregon is based on entirely self-designed hardware [19] that was recently unveiled as Open Compute Project [20].
- 300 TB of data is stored in Memcached processes [21]
- Their Hadoop and Hive cluster is made of 3000 servers with 8 cores, 32 GB RAM, 12 TB disks that is a total of 24k cores, 96 TB RAM and 36 PB disks [22]
- 100 billion hits per day, 50 billion photos, 3 trillion objects cached, 130 TB of logs per day as of july 2010 [22]
[1] HipHop for PHP: http://developers.facebook.com/b...
[2] Making HPHPi Faster: http://www.facebook.com/note.php...
[3] The HipHop Virtual Machine: http://www.facebook.com/note.php...
[4] Thrift: http://thrift.apache.org/
[5] Memcached: http://memcached.org/
[6] HBase: http://hbase.apache.org/
[7] Scribe: https://github.com/facebook/scribe
[8] Scribe-HDFS: http://hadoopblog.blogspot.com/2...
[9] BigPipe: http://www.facebook.com/notes/fa...
[10] Varnish Cache: http://www.varnish-cache.org/
[11] Facebook goes for Varnish: http://www.varnish-software.com/...
[12] Needle in a haystack: efficient storage of billions of photos:http://www.facebook.com/note.php...
[13] Scaling the Messages Application Back End: http://www.facebook.com/note.php...
[14] The Underlying Technology of Messages: https://www.facebook.com/note.ph...
[15] The Underlying Technology of Messages Tech Talk:http://www.facebook.com/video/vi...
[16] Facebook's typeahead search architecture: http://www.facebook.com/video/vi...
[17] Facebook Chat: http://www.facebook.com/note.php...
[18] Who has the most Web Servers?: http://www.datacenterknowledge.c...
[19] Building Efficient Data Centers with the Open Compute Project:http://www.facebook.com/note.php...
[20] Open Compute Project: http://opencompute.org/
[21] Facebook's architecture presentation at Devoxx 2010:http://www.devoxx.com
[22] Scaling Facebook to 500 millions users and beyond:http://www.facebook.com/note.php...
Facebook的体系结构分析---外文转载的更多相关文章
- Linux中断处理体系结构分析
Linux中断处理体系结构分析(一) 异常,就是可以打断CPU正常运行流程的一些事情,比如外部中断.未定义指令.试图修改只读的数据.执行swi指令(Software Interrupt Instruc ...
- S5PV210中断体系结构分析
我们按照Tiny210官方的裸板程序来梳理S5PV210的中断体系. 关于 S5PV210 的中断体系结构 S5PV210 的中断控制器是由 4 个向量中断控制器(VIC). ARM PrimeCel ...
- web前端知识体系大全【转载】
自己总结的web前端知识体系大全[欢迎补充] 1. 前言 大约在几个月之前,让我看完了<webkit技术内幕>这本书的时候,突然有了一个想法.想把整个web前端开发所需要的知识都之中在 ...
- 【MINA学习笔记】—— 1.体系结构分析[z]
前言 Apache的MINA框架是一个早年非常流行的NIO框架,它出自于Netty之父Trustin Lee大神之手.虽然目前市场份额已经逐渐被Netty取代了,但是其作为NIO初学者入门学习框架是非 ...
- Java虚拟机体系结构分析
下图是JAVA虚拟机的结构图: 每个Java虚拟机都有一个类装载子系统,它根据给定的全限定名来装入类型(类或接口).同样,每个Java虚拟机都有一个执行引擎,它负责执行那些包含在被装载类的方法中的指令 ...
- Spring源码阅读-ApplicationContext体系结构分析
目录 继承层次图概览 ConfigurableApplicationContext分析 AbstractApplicationContext GenericApplicationContext Gen ...
- Mina整体体系结构分析
mina在应用程序中处于什么样的地位? mina屏蔽了一些网络通信细节对socket进行封装,并且基于NIO非阻塞框架,可以帮助我们快速开发网络通信,常常用于用户游戏开发,中间件等服务端应用程序.
- Spring源码阅读-BeanFactory体系结构分析
BeanFactory是Spring中非常重要的一个类,搞懂了它,你就知道了bean的初始化和摧毁过程,对于深入理解IOC有很大的帮助. BeanFactory体系结构 首先看一下使用IDEA生成的继 ...
- Libra 加密稳定币:Facebook的"野心"?
2008年11月1日,有一个传说叫中本聪的日裔美国人,发表了一篇名为<比特币:一种点对点式的电子现金系统>的论文.2009年,比特币出世,从此开启了电子货币这个收割机器,全世界的韭菜都是一 ...
随机推荐
- (转)T-SQL查询处理执行顺序(一)
对于T-SQL编程,用得最广泛的,莫过于查询(Querying).要想写出高质量.高性能的查询语句,必须深入地了解逻辑查询处理. 一.逻辑查询处理的各个阶段 (5)SELECT DISTINCT TO ...
- angular学习的一些小笔记(中)之directive
directive里面的几个配置,上代码就清晰了 <!DOCTYPE html> <html ng-app='app'> <head> <meta chars ...
- 关于HTML面试题汇总之visibility
一.页面可见性(visibility) 主要提供两个属性,一个事件(都在document对象上):1. 属性: 1.1. hidden:获取或设置当前页面的可见性,boolean值: 1.2 ...
- 使用 FocusPoint.js 实现图片的响应式裁剪
通常网站的布局都不是单一的.例如图像在电脑.平板和智能手机上可能显示的形状是不同的.特别是如果你使用的是全屏图像,在你必须使用相同的图像文件的情况下,你的主题可能会被截断或完全缺失,或者看起来很尴尬. ...
- 使用 Promises 编写更优雅的 JavaScript 代码
你可能已经无意中听说过 Promises,很多人都在讨论它,使用它,但你不知道为什么它们如此特别.难道你不能使用回调么?有什么了特别的?在本文中,我们一起来看看 Promises 是什么以及如何使用它 ...
- Gulp.js 参考手册,自动化构建利器
Gulp 是最新的基于 Node 的自动化构建工具,希望能够取代 Grunt,成为最流行的 JavaScript 任务运行器.通过结合 NodeJS 的数据流的能力,只需几步就能搭建起自己的自动化项目 ...
- Session Storage、Cache Storage
Session Storage sessionStorage用于本地存储一个会话(session)的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也随之销毁(浏览器关闭).因此se ...
- 从零开始,做一个NodeJS博客(二):实现首页-加载文章列表和详情
标签: NodeJS 0 这个伪系列的第二篇,不过和之前的几篇是同一天写的.三分钟热度貌似还没过. 1 静态资源代理 上一篇,我们是通过判断请求的路径来直接返回结果的.简单粗暴,缺点明显:如果url后 ...
- HTML <b>、 <strong> 、<big>、<small>、<em>、<i>、<sub>和<sup> 标签
HTML <b> 标签 所有浏览器都支持 <b> 标签. 定义和用法 <b> 标签规定粗体文本. 注释:根据 HTML5 规范,在没有其他合适标签更合适时,才应该把 ...
- JavaScript MVC框架和语言总结[infoq]
infoq关于javascript的语言和框架的总结,非常全面,值得一读. http://www.infoq.com/minibooks/emag-javascript Contents of the ...