高流量 Web 应用程序的最佳扩展方法? [英] Best scaling methodologies for a highly traffic web application?

查看:36
本文介绍了高流量 Web 应用程序的最佳扩展方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个新的网络应用项目,该项目将在网站(作为网络)上显示横幅广告,我们估计它每月可以处理 20 到 400 亿次展示.

We have a new project for a web app that will display banners ads on websites (as a network) and our estimate is for it to handle 20 to 40 billion impressions a month.

我们当前的语言是 ASP...但正在转向 PHP.PHP 5 对扩展 Web 应用程序有限制吗?或者,我应该让我们的团队投资选择 JSP 吗?

Our current language is in ASP...but are moving to PHP. Does PHP 5 has its limit with scaling web application? Or, should I have our team invest in picking up JSP?

或者,是应用服务器和/或数据库的问题吗?我们计划使用 Oracle 10g 作为数据库.

Or, is it a matter of the app server and/or DB? We plan to use Oracle 10g as the database.

推荐答案

无意冒犯,但我强烈怀疑您高估了您将提供的展示次数.

No offense, but I strongly suspect you're vastly overestimating how many impressions you'll serve.

说:

应用程序层中使用的 PHP 或其他语言与可扩展性几乎没有关系.由于应用程序层将它的状态委托给数据库或等效物,因此在适当的负载平衡之后添加尽可能多的容量很简单.语言的选择确实会影响每台服务器的效率和成本,但这与可扩展性不同.

PHP or other languages used in the application tier really have little to do with scalability. Since the application tier delegates it's state to the database or equivalent, it's straightforward to add as much capacity as you need behind appropriate load balancing. Choice of language does influence per server efficiency and hence costs, but that's different than scalability.

扩展状态/数据存储变得更加复杂.

It's scaling the state/data storage that gets more complicated.

对于您的应用,您有三项基本工作:

For your app, you have three basic jobs:

  1. 我们展示什么广告?
  2. 服务于添加
  3. 记录印象

每一个都需要思考和可能需要不同的工具.

Each of these will require thought and likely different tools.

第二种是为 add 提供服务,最简单:使用 CDN.如果您确实提供了您声称的数量,您应该能够协商优惠价格.

The second, serving the add, is most simple: use a CDN. If you actually serve the volume you claim, you should be able to negotiate favorable rates.

决定展示哪个广告将非常特定于您的网络.它可能就像从数据库中读取几行一样简单,这些行给出了给定日历期间给定属性的广告展示位置.或者它可能是像谷歌这样复杂的上下文广告.假设更多的是前者,并且展示位置的数据库很小,那么这就是扩展数据库读取的简单任务.您可以使用复制树或替代缓存层,如 memcached.

Deciding which ad to show is going to be very specific to your network. It may be as simple as reading a few rows from a database that give ad placements for a given property for a given calendar period. Or it may be complex contextual advertising like google. Assuming it's more the former, and that the database of placements is small, then this is the simple task of scaling database reads. You can use replication trees or alternately a caching layer like memcached.

最后一个最终将是最困难的:如何扩展写入.一种常见的方法是仍然使用数据库,但采用分片扩展策略.更奇特的选择可能是使用支持计数器指令的键/值存储,例如 Redis,或可扩展的 OLAP 数据库,例如 Vertica.

The last will ultimately be the most difficult: how to scale the writes. A common approach would be to still use databases, but to adopt a sharding scaling strategy. More exotic options might be to use a key/value store supporting counter instructions, such as Redis, or a scalable OLAP database such as Vertica.

以上所有内容均假设您能够确保数据中心空间和网络配置能够为这种负载提供服务,这对于您所说的数字来说并非微不足道.

All of the above assumes that you're able to secure data center space and network provisioning capable of serving this load, which is not trivial at the numbers you're talking.

这篇关于高流量 Web 应用程序的最佳扩展方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆