Update 2: This seems to be a POF Peer1 love fest infomercial. It's pretty content free, but the production values are high. Lots of quirky sounds and fish swimming on the screen.
Update: by Facebook standards Read/WriteWeb says POF is worth a cool one billion dollars. It helps to talk like Dr. Evil when saying it out loud.
PlentyOfFish is a hugely popular on-line dating system slammed by over 45 million visitors a month and 30+ million hits a day (500 - 600 pages per second). But that's not the most interesting part of the story. All this is handled by one person, using a handful of servers, working a few hours a day, while making $6 million a year from Google ads. Jealous? I know I am. How are all these love connections made using so few resources?
每月4500万访问者,每天3000万点击(每秒500到600页)(我的几算是每秒钟400次点击)。仅靠一人之力,每天有限的几个小时支撑,还能从google那里一年拿回600万广告费。想说不羡慕?不用这么虚伪。:P
Site: http://www.plentyoffish.com/
Information Sources
Channel9 Interview with Markus Frind
Blog of Markus Frind
Plentyoffish: 1-Man Company May Be Worth $1Billion The Platform
The Stats
PlentyOfFish (POF) gets 1.2 billion page views/month, and 500,000 average unique logins per day. The peak season is January, when it will grow 30 percent.
POF has one single employee: the founder and CEO Markus Frind.
Makes up to $10 million a year on Google ads working only two hours a day.
30+ Million Hits a Day (500 - 600 pages per second).
1.1 billion page views and 45 million visitors a month.
Has 5-10 times the click through rate of Facebook.
A top 30 site in the US based on Competes Attention metric, top 10 in Canada and top 30 in the UK.
2 load balanced web servers with 2 Quad Core Intel Xeon X5355 @ 2.66Ghz), 8 Gigs of RAM (using about 800 MBs), 2 hard drives, runs Windows x64 Server 2003.
两台web服务器做负载均衡。配置为2 Quad Core Intel Xeon X5355 @ 2.66Ghz、8 Gigs of RAM(但是只使用了800M)、双硬盘,运行微软的2003服务器版本。 3 DB servers. No data on their configuration.
三台数据库服务器。
Approaching 64,000 simultaneous connections and 2 million page views per hour.
每小时大约6万4千个并发连接和200万页面浏览。
Internet connection is a 1Gbps line of which 200Mbps is used.
带宽是1G,只使用了200M
1 TB/day serving 171 million images through Akamai.
Akamai处理每天1亿7千1百万的图片访问,总流量1T。 6TB storage array to handle millions of full sized images being uploaded every month to the site.
6T的磁盘阵列处理每月数百万的全尺寸图片上传。
What's Inside
Revenue model has been to use Google ads. Match.com, in comparison, generates $300 million a year, primarily from subscriptions. POF's revenue model is about to change so it can capture more revenue from all those users. The plan is to hire more employees, hire sales people, and sell ads directly instead of relying solely on AdSense.
商业模式是广告,而不是同类网站match那样采用用户付费。未来可能增加更多的直接广告模式而不是仅仅依赖于adSense
With 30 million page views a day you can make good money on advertising, even a 5 - 10 cents a The amount an advertiser will pay for each 1000 ads shown. Some ad campaigns are sold by CPM, while others are priced by click or another measure. Effective CPM is a useful measure of a campaign's profitability.
The total price paid in a CPM deal is calculated by multiplying the CPM rate by the number of CPM units. For example, one million impressions at $10 CPM equals a $10,000 total price.
1,000,000 / 1,000 = 1,000 units
1,000 units X $10 CPM = $10,000 total price
The amount paid per impression is calculated by dividing the CPM by 1000. For example, a $10 CPM equals $.01 per impression.
$10 CPM / 1000 impressions = $.01 per impression
http://www.marketingterms.com/dictionary/cpm/
">CPM.
Akamai is used to serve 100 million plus image requests a day. If you have 8 images and each takes 100 msecs you are talking a second load just for the images. So distributing the images makes sense.
分布部署图片对于页面加载性能是很有价值的。Akamai来处理每天超过1亿的图片请求。如果每个图片花100毫秒加载,8张图片的加载等待时间就很可观了。 10’s of millions of image requests are served directly from their servers, but the majority of these images are less than 2KB and are mostly cached in RAM.
数千万图片直接从服务器请求。但大多数都小于2K,且基本缓存在内存中。
Everything is dynamic. Nothing is static.
所有的东西都是动态的。没有静态的。(怎么理解?我看到的都是静态化后页面呢。是指功能的设计都是动态交互的?还要再看看去)
All outbound Data is Gzipped at a cost of only 30% CPU usage. This implies a lot of processing power on those servers, but it really cuts bandwidth usage.
所有的输出数据流都经过了Gzip压缩。占用了30%的cpu但是输出带宽成本大大降低了。(这个我们也做了,的确很有效的策略)
No caching functionality in ASP.NET is used. It is not used because as soon as the data is put in the cache it's already expired.
并没有采用.net自身的cache。主要是因为过期的频率太快以至于没有什么效果。(他的什么类型的高度交互数据才会产生这种效果?好好研究研究去)
No built in components from ASP are used. Everything is written from scratch. Nothing is more complex than a simple if then and for loops. Keep it simple.
没有使用任何标准的asp组件。所有都是自己写的。而且复杂度没有超过简单的判断和循环就能解决的。简单就是力量。(果然如此?)
Load balancing 负载均衡
- IIS arbitrarily limits the total connections to 64,000 so a load balancer was added to handle the large number of simultaneous connections. Adding a second IP address and then using a round robin DNS was considered, but the load balancer was considered more redundant and allowed easier swap in of more web servers. And using ServerIron allowed advanced functionality like bot blocking and load balancing based on passed on cookies, session data, and IP data.IIS专断地限制了总连接数为6万4千个。因此更大的并发连接规模就必须使用负载均衡方案解决。可以考虑增加新的IP采用系列DNS解决。但是负载均衡必须考虑更多的冗余和方便的web服务器间切换。ServerIron可以提供一些高级功能。比如:包过滤、基于所传递的cookie、session数据和IP的负载均衡。
- The Windows Network * DNS servers can allocate requests amongst multiple machines
* Web servers can allocate requests amongst machines and processes
* Hardware routers can allocate requests amongst multiple machines
* google uses this strategy for their amazing performance
There is often a large infrastructure in place to replicate state so that requests in the same session can access state from any server.
Clearly mostly read only applications can make the best use of load balancing because the write update consistency problems are not present.
Often L4-L7 swtiches, like the netscaler, are used to load balance servers at line rate.
Or you can load balance without the assist of hardware using Hash Based Node Selection.
For more information please see: http://www.possibility.com/epowiki/Wiki.jsp?page=LoadBalancing">Load Balancing(NLB) feature was not used because it doesn't do sticky sessions. A way around this would be to store session state in a database or in a shared file system.
微软的网络负载均衡没有被采用,是因为不能处理session。可用的方案是把session存储在数据库中或者共享文件。(这个我们也遇到。后来为了解决分布式部署,修改了相关代码,完全放弃了使用session。至今我都还不敢完全断定是不是有效地解决呢。看来判断和方向都没有错。他们没有用这个,又是用什么解决的呢?难道不怕数据库存取session的效率问题?)
- 8-12 NLB servers can be put in a farm and there can be an unlimited number of farms. A DNS round-robin scheme can be used between farms. Such an architecture has been used to enable 70 front end web servers to support over 300,000 concurrent users.
一个场可以容纳8-12个NLB服务器,场的数量没有限制。DNS的轮询方案可以在场间工作。这种架构已经被用来支持多达70个web服务器服务于超过30万的并发用户。
- NLB has an affinity option so a user always maps to a certain server, thus no external storage is used for session state and if the server fails the user loses their state and must relogin. If this state includes a shopping cart or other important data, this solution may be poor, but for a dating site it seems reasonable.
NLB本身支持紧密绑定的选择,这样一个用户可以总是被映射到特定的服务器上。这样就不需要外部保存session状态了。当然,如果这个服务器宕机,用户必须要重新登录了。如果这些session数据中包含购物车或者其他重要数据,这种方案不见得合适。但是对于约会交友的网站,似乎没什么。(对于我们此前的应用也没什么。对于我们将要做的东西,可能就不好。但是真得不能接受么?或者其他什么方案我不知道的?)
- It was thought that the cost of storing and fetching session data in software was too expensive. Hardware load balancing is simpler. Just map users to specific servers and if a server fails have the user log in again.
通常的看法是在软件中存取用户的session数据是不划算的。硬件的负载均衡相对便宜些。只需要简单把用户映射到特定的服务器上,如果宕机,重新登录就是了。
- The cost of a ServerIron was cheaper and simpler than using NLB. Many major sites use them for TCP connection pooling, automated bot detection, etc. ServerIron can do a lot more than load balancing and these features are attractive for the cost.
采用ServerIron比NLB方案经济和简单很多。很多站点用它进行TCP连接池、自动过滤等。ServerIron还有很多有用功能,相对于成本来说,很有吸引力。 Has a big problem picking an ad server. Ad server firms want several hundred thousand a year plus they want multi-year contracts.
拥有强大的问题追踪和广告服务器。广告服务公司每年希望拿到数十万以及多年的合同。
In the process of getting rid of ASP.NET repeaters and instead uses the append string thing or response.write. If you are doing over a million page views a day just write out the code to spit it out to the screen.
完全抛弃了.net自己的repeater。采用了自己写代码追加串response写出的方式。如果你每天有上百万的pageview,那么自己来处理输出到屏幕的动作吧。(经验之谈。也是我们正在修改和下一步开发中定下的策略。看来我们的主要方向还是正确的。真正是相见恨晚啊。)
Most of the build out costs went towards a By contrast to a SAN, network-attached storage (NAS) uses file-based protocols such as NFS or SMB/CIFS where it is clear that the storage is remote, and computers request a portion of an abstract file rather than a disk block.
http://en.wikipedia.org/wiki/Storage_area_network">SAN. Redundancy at any cost.
远程的虚拟文件而不是硬盘块的方式访问?不计代价的冗余?(看起来这是我们还完全不了解的部分秘诀,需要好好研究研究。)
Growth was through word of mouth. Went nuts in Canada, spread to UK, Australia, and then to the US.
Database
- One database is the main database. 一个主数据库
- Two databases are for search. Load balanced between search servers based on the type of search performed.两个从数据库负责查询读取。他们中间的负载均衡采用按照查询类型切分的方式。
- Monitors performance using task manager. When spikes show up he investigates. Problems were usually blocking in the database. It's always database issues. Rarely any problems in .net. Because POF doesn't use the .net library it's relatively easy to track down performance problems. When you are using many layers of frameworks finding out where problems are hiding is frustrating and hard.使用任务管理器进行性能监控。问题的瓶颈往往在数据库上,而.net的问题很少。因为他们没有使用.net的库,跟踪性能问题相对容易。如果采用多层框架,查找问题通常充满挫败感。(尤其是在深层的问题上。可是流行的解决方案都说分层容易定位来着。:P)
- If you call the database 20 times per page view you are screwed no matter what you do.如果你在一个页面上访问数据库超过20此,那么无论你怎么做都不可能很顺利。(然也!我们门前一段时间专门优化部分页面的事实证明非常正确!在页面的设计上,的确是需要考虑这个要素的。毕竟展示一个意图其实有很多种方式。不一定要用最繁重的那种。)
- Separate database reads from writes. If you don't have a lot of RAM and you do reads and writes you get paging involved which can hang your system for seconds.分离数据库的读写。如果如果内存不多,同时读取、写入一个数据库将使系统等上几秒钟。(我们准备作还没有做的事情。他们的同步用的什么方案呢?)
- Try and make a read only database if you can.如果可能,让一个数据库只读。
- Denormalize data. If you have to fetch stuff from 20 different tables try and make one table that is just used for reading.非常规的数据处理方式。如果你需要从20张不同的表中获取数据,那么就专门为此制作一个只读的表。(英雄所见略同。这个正是我们此前优化部分页面采用的方式)
- One day it will work, but when your database doubles in size it won't work anymore.如果你的数据库增加了一倍的时候,很多东西将不再有效了。(原来如此,我们增加了可是不知一倍呢。那么出路呢?)
- If you only do one thing in a system it will do it really really well. Just do writes and that's good. Just do reads and that's good. Mix them up and it messes things up. You run into locking and blocking issues.如果只在系统中执行一件事情,将会工作的非常好。只读只写都没有问题。但是一旦混合,事情就糟糕起来。将会遇到锁定、阻塞的问题。
- If you are maxing the CPU you've either done something wrong or it's really really optimized. If you can fit the database in RAM do it.对于数据库,首先从内存上想办法。
The development process is: come up with an idea. Throw it up within 24 hours. It kind of half works. See what user response is by looking at what they actually do on the site. Do messages per user increase? Do session times increase? If people don't like it then take it down.
开发方法:一旦有了想法,24小时以内上线。虽然是半成品,看是看看用户在网上真正怎么反应的。用户多发了些消息么?在线的时间增加了么?如果用户不喜欢,那么拿掉它。(典型的敏捷开发。我们一直致力于如此,但是做得不够好的。似乎团队越小,越适合敏捷开发。)
System failures are rare and short lived. Biggest issues are DNS issues where some ISP says POF doesn't exist anymore. But because the site is free, people accept a little down time. People often don't notice sites down because they think it's their problem.
系统的重大问题很少而且历时很短。最大的问题是DNS问题,有些ISP找不到他们,说是不存在。但是因为网站服务是免费的,所以用户能够容忍短时间的宕机。通常用户都意识不到系统宕机,而是认为那是他们自己的使用问题。
Going from one million to 12 million users was a big jump. He could scale to 60 million users with two web servers.
从100万到1200万是个大跃级。他能用两台web服务器支持到6000万的用户。 Will often look at competitors for ideas for new features.
经常从竞争对手那里偷艺,找找灵感和新的功能等等。
Will consider something like http://aws.amazon.com/">S3 when it becomes geographically load balanced.
将会考虑 http://aws.amazon.com/">S3那样的基于地理位置的负载均衡方案。
Lessons Learned
You don't need millions in funding, a sprawling infrastructure, and a building full of employees to create a world class website that handles a torrent of users while making good money. All you need is an idea that appeals to a lot of people, a site that takes off by word of mouth, and the experience and vision to build a site without falling into the typical traps of the trade. That's all you need :-)
真正需要的只有经验和远见。用来建立一个不会落入常规交易俗套的网站。
Necessity is the mother of all change.
如无必要,勿做变更。(马上让我想起了剃刀原理:如无必要,勿增实体。)
When you grow quickly, but not too quickly you have a chance grow, modify, and adapt.
处于快速增长而又不是太快的时候,你还有机会来调整、适应、成长。(是在劝说我们不要太着急么?呵呵)
RAM solves all problems. After that it's just growing using bigger machines.
内存解决所有的问题。然后呢,使用更快更大的服务器。
When starting out keep everything as simple as possible. Nearly everyone gives this same advice and Markus makes a noticeable point of saying everything he does is just obvious common sense. But clearly what is simple isn't merely common sense. Creating simple things is the result of years of practical experience.
开始的时候,尽可能让一切事情保持简单。几乎每个人都会给出这个建议。Markus更是特别提到他所做的一切仅仅是常识而已。但是显然,什么是简单的东西显然不是常识的范围。能做出简单的东西是数年实践经验的结果。
Keep database access fast and you have no issues.
只要数据库访问快速,你就可以高枕无忧了。
A big reason POF can get away with so few people and so little equipment is they use a CDN for serving large heavily used content. Using a CDN may be the secret sauce in a lot of large websites. Markus thinks there isn't a single site in the top 100 that doesn’t use a CDN. Without a CDN he thinks load time in Australia would go to 3 or 4 seconds because of all the images.
他们最小人力最少资源成就现在的关键在于他们使用了CDN来提供大量被重度重复使用的内容。使用CDN几乎是许多大型网站的秘方。Markus认为排名在前100的网站没有不使用CDN的。如果没有CDN,他认为自己在澳大利亚的站点将会因为图片问题只有3-4秒的加载效率。(CDN居然有如此高的地位而我们并不真正了解。好在我们的几方正好在部署这个,回头好好配合测试评估一下。)
Advertising on Facebook yielded poor results. With 2000 clicks only 1 signed up. With a CTRof 0.04% Facebook gets 0.4 clicks per 1000 ad impressions, or .4 clicks per CPM. At 5 cent/CPM = 12.5 cents a click, 50 cent/CPM = $1.25 a click. $1.00/CPM = $2.50 a click. $15.00/CPM = $37.50 a click.
在facebook上的广告效果不尽人意。
It's easy to sell a few million page views at high CPM’s. It's a LOT harder to sell billions of page views at high CPM’s, as shown by Myspace and Facebook.
在高CPM的站点上获得几百万页面流量不难。但是像要获得数十亿就不容易了。正如facebook和myspace展示出来的。
The ad-supported model limits your revenues. You have to go to a paid model to grow larger. To generate 100 million a year as a free site is virtually impossible as you need too big a market.
广告支撑的模式会限制你的收入。最终还是要通过付费服务来获得更大成长。事实上免费网站一年想要获得一亿收入是不可能的。
Growing page views via Facebook for a dating site won't work. Having a visitor on you site is much more profitable. Most of Facebook's page views are outside the US and you have to split 5 cent CPM’s with Facebook.
从facebook那里得到流量对于约会型网站无效。在你的网站上的访问者更加有收益价值。facebook得很多流量来自美国以外,而你还要给他们5分/CPM的分帐。
Co-req is a potential large source of income. This is where you offer in your site's sign up to send the user more information about mortgages are some other product.
让人着急,最关键的另外一个很大的潜在收入来源我却没有看懂。谁能帮帮我?
You can't always listen to user responses. Some users will always love new features and others will hate it. Only a fraction will complain. Instead, look at what features people are actually using by watching your site.
不能总是相信用户的反馈。有些用户总是喜欢新功能,而另外一些会非常讨厌新功能。而只有少部分用户会抱怨。那么实际看看用户在你的网站上都用了哪些功能。 Related Articles
MySpace also uses Windows to run their site.(这个消息我们知道的不晚,甚至看了他的案例分析,但是对我们的实际指导价值有限。毕竟资源禀赋差异太大。相对来讲,这个就很和我们的状态。幸甚至哉!)
Thanks to Erik Osterman for recommending profiling PlentyOfFish.
0 条评论:
发表评论
订阅 博文评论 [Atom]
<< 主页