互联网公司技术架构资料.新浪微博.构建可扩展微博架构new

互联网公司技术架构资料.新浪微博.构建可扩展微博架构new

ID:34515035

大小:664.89 KB

页数:51页

时间:2019-03-07

互联网公司技术架构资料.新浪微博.构建可扩展微博架构new_第1页
互联网公司技术架构资料.新浪微博.构建可扩展微博架构new_第2页
互联网公司技术架构资料.新浪微博.构建可扩展微博架构new_第3页
互联网公司技术架构资料.新浪微博.构建可扩展微博架构new_第4页
互联网公司技术架构资料.新浪微博.构建可扩展微博架构new_第5页
资源描述:

《互联网公司技术架构资料.新浪微博.构建可扩展微博架构new》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、¢sBfx<¤¢TimYang!²x<¤¢k<^4x<<^•7Ú–?à–±ä–½æ•ContentManagerSystem!<^•,LAMP!–MySQLmaster/slave"–Memcached"–PHP"–CDN"x<•x<I–Real-time"–,°,Í–&

2、ÙD&

3、ÙD&

4、ÙD•x<Ã&

5、ÙDéç©v–Push()"–Pull()"Push•x<Â(ù–Inbox:4¾x<–Outbox:i?àx<•?à[4Ìinbox(ü)!•

6、¥ÂÁêÿInbox(ò)!Push(Figure)UserAUpdateActionFollowersofUserA=1,2,3InboxInboxInbox(Appendto1s(Appendto2s(Appendto3shometimeline)hometimeline)hometimeline)Push•¶]¸Ê;Ċõ•Ô¶0?ýPull•?à[4Ûhoutbox(ò)!•¥Â,°bíInbox(ü)!PullUserIGethome_timelineUserIsFo

7、llowingList=A,B,COutboxOutboxOutbox(statusessentbyA)(StatusessentbyB)(StatusessentbyC)Pull•¶ÜÎ[)•Ô¶çËýV•x<´

8、0?ÍÑ•Bû@}¾v]¸¤¢~g'-YāTÜìý•Y£?àý5,000/W•nQ578¡/Ä•éçÍÑ_ý2,000?!IOºĈ•g'5,000–10,000?!•100,000?!F£•Latency!•DBreadtimeout!•5Çtim

9、eout(503error)!•å/§u«éç• E«Éw•c´

10、[+´

11、Ā2(MessageQueue)!•òýϾ?àMQproducts•Kestrelbytwitter"•RabbitMQ,anErlangQueueServer"•Memcacheq!–O²x<ćÀVã©#¼Memcacheq•RBerkeleydb,ÆBĆ•Memcachedprotocol,a¾clientlibrary!•_¿(statsqueue)!•A2Hget/set!ø*;¶ă¦y9

12、Ąø*;·ă¯1.#¼UMemcacheq®2.Get":ñë9J3.Set":ĂõĄ-S ¤¢éçMQvö¼¾¶•Offlinework!•p¼ìý Qß•åØ•u«öè•>3#¼MQ>3çËtþV´

13、0?tþ¤¢~]{îüâ¾îl]{Thevalueofthetweetdecreasesexponentiallywithhttp://t.sina.com.cn/pub/star#a_tytime!"JohnKalucki,Twitter"å/

14、zïCachey:Ramisthenewthedisk!•LocalCache!•Memcached!•Databasebuffer/cache!•LAMPcache=Bõe•Cachey:F¾ÿĉ_ýÿĉ•TBÏ•zï=Ó–QuickLZ"–LZO"– ¼gzip";¶ÿĉ•;¶ă,SIGSEGV!•Y!pb–1.Consistenthash"–2.Read-throughcache"Consistenthash•>¹•¶–ąÝdRead-throughcache

15、Read-throughandWrite-through•Productsorprojects!–MySQLmemcachedUDF"–CachemoneyforRubyonRails"•Orwrapaproxyforthedbdriver,inanylanguage!Evictionsÿĉ•Evections:cacheáð•{Ú¾K¨•Latency»¾µXY!ø*evictions•ã1cache_ý•c¬ 0t• #¼ĂZÈ"key!MultigetÿĉWhenmem

16、cachedserversareCPUbound,addingmorememcachedserversdoesn'thelpservemorerequests.!!-JeffRothschild,VicePresidentofTechnologyatFacebook"Cache~multigetholeApplicationMaxRPSofapplication<(AandBandC)teigltuMMultiget(keys…)tetteeigltigigultl

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。