原贴:http://www.dbanotes.net/techmemo/digg_arch_cache_and_shard.html
Tellhow -- Generator, genset, diesel generator
<script type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-2198040673582211&cpa_choice=CAAQhaT2_gEaCI52gVKP95-sKLGsuIEBMAA&oe=utf-8&dt=1194257259171&lmt=1193841820&format=ref_text&output=textlink&correlator=1194257259156&url=http%3A%2F%2Fwww.dbanotes.net%2Ftechmemo%2Fdigg_arch_cache_and_shard.html®ion=_google_cpa_region_&ref=http%3A%2F%2Fwww.dbanotes.net%2Farchives.html&cc=100&ga_vid=526080855.1194257259&ga_sid=1194257259&ga_hid=1138329697&flash=9&u_h=1024&u_w=1280&u_ah=874&u_aw=1280&u_cd=32&u_tz=480&u_java=true" type="text/javascript"></script> Get Firefox with Google Toolbar for better browsing
<script type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-2198040673582211&cpa_choice=CAAQidTQgAIaCEapPfRcsfp6KN2uuIEBMAA&oe=utf-8&dt=1194257262343&lmt=1193841820&prev_fmts=ref_text&format=ref_text&output=textlink&correlator=1194257262343&url=http%3A%2F%2Fwww.dbanotes.net%2Ftechmemo%2Fdigg_arch_cache_and_shard.html®ion=_google_cpa_region_&ref=http%3A%2F%2Fwww.dbanotes.net%2Farchives.html&cc=100&ga_vid=526080855.1194257259&ga_sid=1194257259&ga_hid=1138329697&flash=9&u_h=1024&u_w=1280&u_ah=874&u_aw=1280&u_cd=32&u_tz=480&u_java=true" type="text/javascript"></script> Generate revenue from your website. Google AdSense.
Digg 网站架构
网址: http://www.dbanotes.net/techmemo/digg_arch_cache_and_shard.html
本篇描述一下 Digg 的网站架构.
国庆期间又收集了一些关于网站架构的信息。一直没有进行系统的整理。越来越发现其实都是自我重复的劳动,后续的信息都是嚼别人剩下的甘蔗。--by Fenng
Digg 工程师采用 LAMP (Linux, Apache, MySQL and PHP) 模式。这个 Alexa 排名在 100 左右的、自我估价 1.5 亿美金的站点目前有超过 100 台的 PC 服务器(足够少了),可以粗略分成三个部分:数据库服务器,Web 服务器,搜索服务器。
数据库方面,和其他成功的 Web 2.0 站点一样,也是 MySQL,不过 Digg 稍微"激进"一点,用 MySQL 5,而且号称从 MySQL 4 升级到 5 性能没有什么影响。 OLTP 应用用 InnoDB 引擎, OLAP 用 MyISAM。后端数据库的读比例达到 98%,写只有 2%,实际的读写比例应该高于这个数字,这应该是 Digg 在前端用 Memcached 以及 APC PHP accelerator / MCache 做缓存后的效果。在 IO 上似乎压力并不大。
数据库分割用 Sharding (分片)的机制。从透露出来的信息看,Digg 数据量并不大,仅仅刚超 30g . 看起来是只存储了一些元数据。至于这个 Sharding 或者 Shard, 其出发点有些类似于数据库的分区,差别可能就是不再一个库上吧,其实都是结合业务和应用来对一些数据对象进行分割。
搜索服务器用的是 Lucene。
进一步阅读:
- Digg Architecture
- How Digg.com uses the LAMP stack to scale upward
- Digg PHP's Scalability and Performance
--EOF--
这篇 【Digg 网站架构 】来自 dbanotes.net | del.icio.us | 雅虎收藏+
Tellhow -- Generator, genset, diesel generator
<script type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-2198040673582211&cpa_choice=CAAQhaT2_gEaCI52gVKP95-sKLGsuIEBMAA&oe=utf-8&dt=1194257259171&lmt=1193841820&format=ref_text&output=textlink&correlator=1194257259156&url=http%3A%2F%2Fwww.dbanotes.net%2Ftechmemo%2Fdigg_arch_cache_and_shard.html®ion=_google_cpa_region_&ref=http%3A%2F%2Fwww.dbanotes.net%2Farchives.html&cc=100&ga_vid=526080855.1194257259&ga_sid=1194257259&ga_hid=1138329697&flash=9&u_h=1024&u_w=1280&u_ah=874&u_aw=1280&u_cd=32&u_tz=480&u_java=true" type="text/javascript"></script> Get Firefox with Google Toolbar for better browsing
<script type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script language="JavaScript1.1" src="http://pagead2.googlesyndication.com/cpa/ads?client=ca-pub-2198040673582211&cpa_choice=CAAQidTQgAIaCEapPfRcsfp6KN2uuIEBMAA&oe=utf-8&dt=1194257262343&lmt=1193841820&prev_fmts=ref_text&format=ref_text&output=textlink&correlator=1194257262343&url=http%3A%2F%2Fwww.dbanotes.net%2Ftechmemo%2Fdigg_arch_cache_and_shard.html®ion=_google_cpa_region_&ref=http%3A%2F%2Fwww.dbanotes.net%2Farchives.html&cc=100&ga_vid=526080855.1194257259&ga_sid=1194257259&ga_hid=1138329697&flash=9&u_h=1024&u_w=1280&u_ah=874&u_aw=1280&u_cd=32&u_tz=480&u_java=true" type="text/javascript"></script> Generate revenue from your website. Google AdSense.
本文相关评论|Comments(2)
添加评论
<script type="text/javascript"> </script> 直接匿名评论 或者 登录 评论这篇文章(OpenID、TypeKey...)
30G!!!天哪,我一天的归档日志都是它的10倍。
好文,收藏至20ju.com