2012年3月
美
Facebook使用BitTorrent来部署他们的代码
http://torrentfreak.com/facebook-uses-bittorrent-and-they-love-it-100625/
BitTorrent设计的目的就是能够在很短的时间内传送大文件到很多个目的地.他们不仅仅只是让一般用户能够用来下载电影或者音乐,而是同样能够让企业从中获益.Facebook就在使用Bittorrent来很快的部署自己的代码到全球的服务器上.大访问量的服务提供商例如Facebook他们需要上千台的服务器来提供服务给用户.这样他们就必须在很短的时间内让用户不管是什么地方的都能够访问到最新的服务,就需要每一台服务器上面的代码都是最新的.
使用Mustache模板系统
- https://github.com/janl/mustache.js
- http://mustache.github.com/mustache.5.html
- http://mustache.github.com/
前段时间接触了Mustache这个十分简单的模板系统,感觉挺不错的.正好我的那个记账的小站上还缺点功能,一直没有兴趣来实现,正好,练练手.
- 一个htm页面.发送ajax请求.
- 一个php文件,用来返回json数据.
- 一个模板文件.用来和json生成页面到上面提到的主页面中.
其实之前也用到过ajax请求得到json数据.然后在js中一个个填充到页面中,只不过这样的页面代码看起来有点丑,而这个mustache正好能够帮助我们完成这个任务.
先看看这个第一个htm页面:
然后看看那个php代码:
然后这样就能够实现我对于往月花销分类的一个简单分类统计.
没有状态就靠兴趣好玩支撑了!
Stack Exchang网站架构
由Kyle Brandt发布在http://blog.serverfault.com/2011/02/11/stack-exchanges-architecture-in-bullet-points/
I thought as a break form the normal prose some of our readers might enjoy a short overview of the Stack Exchange Network (including Stack Overflow, Server Fault, and Super User) from a technical view:
Traffic:
- 95 Million Page Views a Month
- 800 HTTP requests a second
- 180 DNS requests a second
- 55 Megabits per second
Data Centers:
- 1 Rack with Peak Internet in OR (Hosts our chat and Data Explorer)
- 2 Racks with Peer 1 in NY (Hosts the rest of the Stack Exchange Network)
Production Servers*:
- 12 Web Servers (Windows Server 2008 R2)
- 2 Database Servers (Windows Server 2008 R2 and SQL Server 2008 R2)
- 2 Load Balancers (Ubuntu Server and HAProxy)
- 2 Caching Servers (Redis on CentOS)
- 1 Router / Firewall (Ubuntu Server)
- 3 DNS Servers (Bind on CentOS)
Software and Technologies Used:
- C# / .NET
- Windows Server 2008 R2
- SQL Server 2008 R2
- Ubuntu Server
- CentOS
- HAProxy for load balancing
- Redis for caching
- CruiseControl.NET for builds
- Lucene.NET for search
- Bacula for backups
- Nagios (with n2rrd and drraw plugins) for monitoring
- Splunk for logs
- SQL Monitor from Red Gate for SQL Server monitoring
- Mercurial / Kiln for source control
- Bind for DNS
Developers and System Administrators:
- 14 Developers
- 2 System Administrators
*(excludes fail over and management servers)
Posted by Kyle Brandt (@kylembrandt) on February 11th, 2011
Filed under Hardware, Software