MySpace Architecture

Information Sources

Presentation: Behind the Scenes at MySpace.com
Inside MySpace.com

Platform

ASP.NET 2.0
Windows
IIS
SQL Server

What's Inside?

300 million users.
Pushes 100 gigabits/second to the internet. 10Gb/sec is HTML content.
4,500+ web servers windows 2003/IIS 6.0/APS.NET.
1,200+ cache servers running 64-bit Windows 2003. 16GB of objects cached in RAM.
500+ database servers running 64-bit Windows and SQL Server 2005. MySpace processes 1.5 Billion page views per day and handles 2.3 million concurrent users during the day
Membership Milestones:
- 500,000 Users: A Simple Architecture Stumbles
- 1 Million Users:Vertical Partitioning Solves Scalability Woes
- 3 Million Users: Scale-Out Wins Over Scale-Up
- 9 Million Users: Site Migrates to ASP.NET, Adds Virtual Storage
- 26 Million Users: MySpace Embraces 64-Bit Technology
500,000 accounts was too much load for two web servers and a single database.
At 1-2 Million Accounts
- They used a database architecture built around the concept of vertical partitioning, with separate databases for parts of the website that served different functions such as the log-in screen, user profiles and blogs.
- The vertical partitioning scheme helped divide up the workload for database reads and writes alike, and when users demanded a new feature, MySpace would put a new database online to support it.
- MySpace switched from using storage devices directly attached to its database servers to a storage area network ( SAN ), in which a pool of disk storage devices are tied together by a high-speed, specialized network, and the databases connect to the SAN. The change to a SAN boosted performance, uptime and reliability.
At 3 Million Accounts
- the vertical partitioning solution didn't last because they replicated some horizontal information like user accounts across all vertical slices. With so many replications one would fail and slow down the system.
- individual applications like blogs on sub-sections of the Web site would grow too large for a single database server
- Reorganized all the core data to be logically organized into one database
- split its user base into chunks of 1 million accounts and put all the data keyed to those accounts in a separate instance of SQL Server
9 Million–17 Million Accounts
- Moved to ASP.NET which used less resources than their previous architecture. 150 servers running the new code were able to do the same work that had previously required 246.
- Saw storage bottlenecks again. Implementing a SAN had solved some early performance problems, but now the Web site's demands were starting to periodically overwhelm the SAN's I/O capacity—the speed with which it could read and write data to and from disk storage.
- Hit limits with the 1 million-accounts-per-database division approach as these limits were exceeded.
- Moved to a virtualized storage architecture where the entire SAN is treated as one big pool of storage capacity , without requiring that specific disks be dedicated to serving specific applications. MySpace now standardized on equipment from a relatively new SAN vendor, 3PARdata
Added a caching tier—a layer of servers placed between the Web servers and the database servers whose sole job was to capture copies of frequently accessed data objects in memory and serve them to the Web application without the need for a database lookup.
26 Million Accounts
- Moved to 64-bit SQL server to work around their memory bottleneck issues. Their standard database server configuration uses 64 GB of RAM.
Horizontally Federated Database . Databases are partition by purpose. Have profile, email databases etc. Partition is based on user range. 1 Million users live in each database. So you have Profile1, Profile2 all the way up to Profile300 as they have 300 million users.
Doesn't use ASP cache because they don't have a high enough hit rate on the front-end. The middle tier cache does have a high hit rate.
Failure isolation . Segment requests into web server by database. Allow only 7 threads per database. So if the database is slow only those threads will slowdown and the traffic in the other threads will flow.

Operations

PerfCollector . Centralized collection of performance data via UDP. More reliable than Windows and allows any client to connect and see stats.
Web Based Stack Dump Tool . Can right-click on a problem server and get stack dump of the .Net managed threads. Used to have to RDC into system and attach a debugger and 1/2 later get an answer. Slow, nonscalable, and tedious. Not just a stack dump, gives a lot of context about what the thread is doing. Troubleshooting is easier because you can see 90 threads are blocked on a database so the database may be down.
Web Base Heap Dump Tool . Dumps all memory allocations. Very useful for developers. Save hours of doing it by hand.
Profiler . Traces a request from start to finish and produces a report. See URL, methods, status, everything that will help you identify a slow request. Looks at lock contentions, are a lot of exceptions being thrown, anything that might be interesting. Very light weight. It's running on one box in every VIP (group of 100 servers) in production. Samples 1 thread every 10 seconds. Always tracing in background.
Powershell . Microsoft's new shell that runs in process and pass objects between commands versus parsing text output. MySpace develops a lot of commandlets to support operations.
Developed their own asynchronous communication technology to get around windows networking problems and treat servers as a group. Can ship a .cs file, compile it, run it, and ship the response back.
Codespew . Pushes code updates on their communication technology. Used to do 5 code pushes a day, now down to 1 a week.

Lessons Learned

You can build big websites using Microsoft tech.
A cache should have been used from the beginning.
The cache is a better place to store transitory data that doesn't need to be recorded in a database, such as temporary files created to track a particular user's session on the Web site.
Built in OS features to detect denial of service attacks can cause inexplicable failures.
Distribute your data to geographically diverse data centers to handle power failures.
Consider using virtualized storage/clustered file systems from the start. It allows you to massively parallelize IO access while being able to add disk as needed without any reorganization needed.
Develop tools that work in a production environment. Can't simulate everything in test environment. The scale and variety of uses APIs are put to can't be simulated in QA during testing. Legitimate users and hackers will run into corner cases that weren't hit in testing, though QA will find most of the problems.
Throw hardware at problems. Easier than changing their backend software to a new way of doing things. The example is they add a new database server for every million users. It might be more efficient to change their approach to more efficiently use the database hardware, but it's easier just to add servers. For now.
Linux下的段错误(Segmentation fault)产生的原因及调试方法(经典) 立即下载

相关推荐

【带状电容器计算用于电容式触摸传感器应用】半数值模型的电容式触摸传感器集成于金属基材涂层中研究(Matlab代码实现)

内容概要:本文针对电容式触摸传感器在金属基材上应用时易受干扰的问题,提出一种基于半数值模型的仿真分析方法,用于精确计算带状电容器在金属背景下的电容变化。研究通过构建合理的物理模型,结合电磁场理论与数值计算技术,在Matlab平台上实现代码仿真,有效克服金属环境对传感器性能的负面影响,提升其在复杂材料表面工作的稳定性和灵敏度,具有良好的工程应用前景。该方法不仅适用于基础研究,也可为实际产品中抗干扰触摸传感器的设计提供理论依据和技术支撑。; 适合人群:具备电磁场与微波技术基础知识及Matlab编程能力,从事传感器设计、人机交互设备开发、嵌入式系统研发等相关领域的高校研究生、科研人员和工程技术人员。; 使用场景及目标:①开展电容式触摸传感器在金属基材上的集成与优化设计;②掌握半数值建模与仿真方法在电磁传感系统中的应用;③为工业环境下高抗扰触摸器件的研发提供仿真验证手段与设计指导。; 阅读建议:此资源强调物理建模与数值仿真的紧密结合,建议读者结合电磁学原理深入理解边界条件设置、介质分布建模与电场求解过程,并动手运行Matlab代码,调试参数以观察电容响应特性,从而全面提升对传感器工作机制与仿真分析能力的掌握。

大型网站架构:Flickr网站体系结构分析(转)

Flickr是我个人喜爱的网站之一,也是互联网上最主要的图片共享网站。Flickr网站后台有许多非常复杂的问题需要处理,它们需要处理海量的新增的内容,管理大批的用户,不断保持新的功能特征,与此同时,还要提供一流的性能。它们是如何做到的呢? Flickr网站的网址是:http://www.flickr.com/ 参考文献 Flickr and PHP(一个早期的文档) LAMP容量规划 Fl...

weixin_30314793的博客 109

【顶级EI复现】基于KKT条件与分段解析优化的双有源桥DC-DC变换器软开关协同最小应力闭环控制方法(Simulink仿真实现)

内容概要:本文提出了一种基于KKT条件与分段解析优化的双有源桥DC-DC变换器软开关协同最小应力闭环控制方法,旨在实现高效、高可靠性的电力转换。该方法通过建立精确的电路数学模型,结合KKT最优性条件进行分段解析优化,有效协调零电压/零电流软开关实现条件与功率器件电压电流应力之间的矛盾,在确保宽范围软开关的前提下显著降低器件的电气应力,从而提升系统效率与寿命。文中详细阐述了控制策略的理论推导过程,并在Simulink平台上构建了完整的闭环仿真模型,验证了该方法在动态响应速度、转换效率优化及器件应力抑制等方面的优异性能,是对高水平EI期刊研究成果的高质量复现; 适合人群:电力电子、电气工程及其自动化等相关专业的研究生、科研人员,以及从事DC-DC变换器控制算法开发的工程师;适用于具备扎实电路拓扑分析能力与现代控制理论基础的专业技术人员; 使用场景及目标:①深入理解双有源桥(DAB)变换器的工作机理与关键控制挑战;②掌握将非线性优化问题转化为KKT条件求解的方法及其在电力电子系统中的实际应用;③学习如何通过分段解析策略实现多目标(软开关与低应力)协同优化控制;④复现并拓展EI级论文中的先进控制算法,支撑科研创新与工程实践; 阅读建议:建议读者结合提供的Simulink仿真模型,逐步跟进理论推导与控制逻辑实现过程,重点关注KKT条件的引入方式、边界约束处理及闭环控制器设计细节,同时可尝试将该优化思想迁移至其他隔离型DC-DC变换器拓扑中进行对比验证,以深化对先进优化控制策略的理解与应用能力。

Apache 2.2.11

Changes with Apache 2.2.11 *) core: When the ap_http_header_filter processes an error bucket, cleanup the passed brigade before returning AP_FILTER_ERROR down the filter chain. This unam...

webwindy的专栏 539

BUUCTF--[OGeek2019]babyrop

才学习了基本的ROP流程,到处找题练,不过也没做出来几道题,以这道32位的题作为例题吧。 这道题是BUUCTF上pwn练习题里的[OGeek2019]babyrop。 代码审计 老规矩先checksec一下: 没有canary保护,nx保护开启排除shellcode可能性,FULL RELEO为地址随机化。 观察主函数,先设定了一个闹铃,到时间就会强制退出程序,解除闹铃的方法在上一篇博客中提到过了, 这道题中闹铃函数依然对我们解题起不到什么干扰作用。 主函数的思路大概是:生成一个随机数,把这个随机数作为

N1rvana的博客 6004

华为云CodeHub保姆级教程:从零开始,5分钟搞定本地代码上传(含常见报错解决)

本文提供华为云CodeHub的保姆级教程,从零开始5分钟完成本地代码上传,涵盖环境准备、仓库创建、远程连接及常见报错解决。特别适合新手开发者快速掌握Git命令与云端协作流程,确保代码安全高效上传。

weixin_30443075的博客 480

Scaling Digg and Other Web Applications

Joe Stump, Lead Architect at Digg, gave this presentation at the Web 2.0 Expo. I couldn't find the actual presentation, but fortunately Kris Jordan took some great notes. That's how key moments in hi...

webwindy的专栏 394

Windows Server 2019/2022 RDS 授权实战:3步激活许可证服务器,解决120天宽限期问题

本文详细介绍了Windows Server 2019/2022 RDS授权实战,提供3步激活许可证服务器的完整解决方案,解决120天宽限期问题。涵盖远程桌面授权服务器配置、许可证激活方法及组策略设置,确保企业合规使用远程桌面服务。

weixin_32705179的博客 963

Memcached 1.4.0 Release

New Features Binary Protocol A new feature that brings new features. We now have goodness like CAS-everywhere (e.g. delete), silent, but verifiable mutation commands, and many other wonders. Note t...

webwindy的专栏 321

SAP 人力资源工资配置项3---工资项配置

工资项设置

xiouluoyang的专栏 1万+

OpenClaw 运行时错误文档:Embedded Run Agent End with Stream Error(嵌入式运行代理结束流式错误)

OpenClaw运行时错误文档:EmbeddedRunAgentEndwithStreamError(OC-ERR-009) 该错误表示LLM提供商在流式传输过程中发生服务器端异常(HTTP 500),属于可恢复的中等严重性错误。典型表现为日志中出现包含"stream_error"和500状态码的错误信息。系统会自动进行错误分类(50%为服务过载,25%网络问题等),并通过内置机制尝试解决:包括模型切换、API密钥轮换和自动重试策略。用户可采取重试请求、切换模型或简化请求内容等操作,管理

多媒体编程、网络编程、系统编程、网络安全编程、驱动编程 546

Redis 2.2.0 RC1 is out

Redis 2.2.0 RC1 新特性:很多都是我所期待的; Specially encoded data types, small lists and sets can now use up to an order of magnitude less memory. VM partial rewrite for code cleaness and memory usage.* Change...

webwindy的专栏 315

17、Nimble 包开发与并行编程指南

本文介绍了Nimble包的开发与版本管理流程,涵盖语义化版本控制规范及发布步骤;深入探讨了Nim中的并行编程基础,包括并发与并行的区别、threads模块与threadpool模块的使用方法及其差异;分析了线程执行的不确定性、线程池的优势,并提供了线程同步和资源管理的实践示例,帮助开发者高效构建稳定、高性能的Nim应用程序。

wine的专栏 55

nginx-0.7.55

Changes with nginx 0.7.55                                        06 May 2009    *) Bugfix: the http_XXX parameters in "proxy_cache_use_stale" and       "fastcgi_cache_use_stale" directives did not...

webwindy的专栏 280

SPI协议详解(图文并茂+超详细)

先说串口 因为之前写过一篇UART,通用串行异步通讯协议,UART的相关资料 因为UART没有时钟信号,无法控制何时发送数据,也无法保证双发按照完全相同的速度接收数据。因此,双方以不同的速度进行数据接收和发送,就会出现问题。 如果要解决这个问题,UART为每个字节添加额外的起始位和停止位,以帮助接收器在数据到达时进行同步; 双方还必须事先就传输速度达成共识(设置相同的波特率,例如每秒9600位)。 传输速率如果有微小差异不是问题,因为接收器会在每个字节的开头重新同步。相应的协议如下图所示; 如果您注意到

一名热爱技术的工程师的博客。分享技术干货,记录美好生活。永远相信美好的事情即将发生。 33万+

我的python学习之路

Python 是一门功能强大且易于学习的编程语言,广泛应用于数据分析、人工智能、Web 开发、自动化等领域。以下是一个 Python 学习路径的总结,帮助你系统地掌握 Python 编程。

数据知道的博客 3万+

December 2008 Web Server Survey

In the December 2008 survey, we received responses from 186,727,854 sites. This total has grown by 1.56 million sites since last month. Apache shows the largest growth this month, gaining a furth...

webwindy的专栏 272

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

Open Source SSL Acceleration

SSL acceleration is a technique that off-loads the processor intensive public key encryption algorithms used in SSL transactions to a hardware accelerator. These solutions often involve a consid...

webwindy的专栏 236

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

iBATIS 3 for Java Released (BETA 1)

A month ago iBATIS turned 7 years old, and while we're celebrating a little late, today we're happy to announce iBATIS 3 for Java. iBATIS 3 is a complete rewrite from the ground up and thus represents...

webwindy的专栏 226

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

nginx-0.7.14

Changes with nginx 0.7.14                                        01 Sep 2008    *) Change: now the ssl_certificate and ssl_certificate_key directives       have not default values.    *) Feature:...

webwindy的专栏 224

lucene 2.4.0

Changes in backwards compatibility policy    (1) LUCENE-1340 : In a minor change to Lucene's backward compatibility policy, we are now allowing the Fieldable interface to have changes, within re...

webwindy的专栏 214

Cloud Relationship Model

Hiya All, welcome to my first guest post at Startup Essentials; today I'm going to be talking about the cloud relationship model I've developed and it's use as an artefact when discussing cloud comput...

webwindy的专栏 197

nginx 0.6.32 release

Changes with nginx 0.6.32                                        07 Jul 2008   *) Change: the "none" parameter in the "ssl_session_cache" directive;      now this is default parameter.      Thanks to ...

webwindy的专栏 192

January 2009 Web Server Survey

In the January 2009 survey we received responses from 185,497,213 sites, reflecting an uncharacteristic monthly loss of 1.23 million sites. Apache's market share grew by more than 1 percentage poi...

webwindy的专栏 192

March 2009 Web Server Survey

In the March 2009 survey, we received responses from 224,749,695 sites. This has brought the total up by more than 9 million sites, with QQ and Microsoft making the most significant contributions. Apa...

webwindy的专栏 185

nginx 0.7.26

Changes with nginx 0.7.26                                        08 Dec 2008    *) Bugfix: in subrequest processing; the bug had appeared in 0.7.25.     Windows port of Nginx 0.7.26 is here: http:/...

webwindy的专栏 177
上一篇: 俄罗斯农民乘法
下一篇: Scaling Digg and Other Web Applications
webwindy
博客等级 码龄20年 3粉丝 66原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值