简体   繁体   English

托管高流量的Facebook应用程序(游戏)

[英]hosting a high traffic facebook app (game)

we are currently developing a high traffic facebook application. 我们目前正在开发一个高流量的facebook应用程序。 all the traffic will be within one month, where there are 500.000 to 1.000.000 expected users. 所有流量将在一个月内,其中有500.000到1.000.000预期用户。 after that month, the game is over and we have a winner - so the app will be archived. 在那个月之后,游戏结束了,我们有一个胜利者 - 所以应用程序将被存档。

we are currently planning to develop the application with ruby on rails and searching for hosting options that can deal with the traffic. 我们目前正计划使用ruby on rails开发应用程序并搜索可以处理流量的托管选项。 the problem is not so much the users, but the peak values: we will have around 500.000 requests coming daily within a short timeframe (lets say within 3 minutes in the worst case) 问题不在于用户,而在于峰值:我们将在短时间内每天发出约500,000个请求(假设在最坏的情况下在3分钟内)

we are expecting 500.000 to 1.000.000 users of the application, with peaks at 1:00pm (timezone GMT+1), where most (up to 80% of the users) will send most of the requests. 我们预计应用程序的用户数为500.000到1.000.000,下午1:00(格林威治标准时间+ 1时区)达到峰值,其中大多数(高达80%的用户)将发送大部分请求。 the requests are from 11th of june to 11.july - after that, the app/game is closed/over. 请求是从6月11日到11.july - 之后,应用程序/游戏关闭/结束。

we are currently developing an aggressive caching mechanism - currently we are thinking about 2 or 3 small apps/webservices, that will handle the load. 我们目前正在开发一种积极的缓存机制 - 目前我们正在考虑2或3个小应用程序/ web服务,它们将处理负载。

the load is distributed as follows: a) main application, cached data (11 screens, 200k each) b) voting: every day until 1:00pm (timezone GMT+1) - every user votes with about 10k data sent, high concurrent peak values! 负载分布如下:a)主要应用程序,缓存数据(11个屏幕,每个200k)b)投票:每天下午1:00(时区GMT + 1) - 每个用户投票约10k数据发送,高并发峰值值!

questions: 问题:

  • is there any specific application setup that is recommendable? 是否有任何特定的应用程序设置是值得推荐的?
  • are there any hosting partners that can be recommended? 有没有可以推荐的托管合作伙伴?

thanks! 谢谢!

Well if the content you serve out is all cached then you are good with that, a few nginx instances can serve almost unlimited static pages. 好吧,如果您提供的内容全部被缓存,那么您很好,一些nginx实例可以提供几乎无限的静态页面。

The voting sounds less nice since it is supposed to happen all at the same time. 投票听起来不太好,因为它应该同时发生。 The new hotness for high concurrent loads seems to be node.js but I don't have any experience with that. 高并发负载的新热点似乎是node.js,但我没有任何经验。

I do think though that the voting will not actually do very much so instead of doing a full rails stack call try to just write a small rack method that accomplishes the voting. 我确实认为投票实际上不会做太多,所以不要做一个完整的铁栈堆调用尝试只写一个小机架方法来完成投票。 That saves you from loading ActionController, ActionView and if you write your votes to the DB in plain SQL also ActiveRecord. 这样可以避免加载ActionController,ActionView以及在纯SQL和ActiveRecord中将数据写入数据库。

Check out some auto scaling cloud computing solutions such as EC2's AutoScaling http://aws.amazon.com/autoscaling/ you set parameters as to when EC2 will spin up new instances for you. 查看一些自动扩展云计算解决方案,例如EC2的AutoScaling http://aws.amazon.com/autoscaling/,您可以设置EC2何时为您启用新实例的参数。

If you really want to be careful you can then build a botnet to simulate traffic to your site http://www.talcottsystems.com/articles/build-your-own-botnet-with-ec2-and-capistrano-to-load-test-your-server-cluster-before-launch/ 如果你真的想要小心,你可以建立一个僵尸网络来模拟你网站的流量http://www.talcottsystems.com/articles/build-your-own-botnet-with-ec2-and-capistrano-to-load -测试-你的服务器集群,之前推出/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM