`
hideto
  • 浏览: 2682433 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

DHH对Rails的scalability的解释

    博客分类:
  • Ruby
阅读更多
I've said it before, but it bears repeating: There's nothing interesting about how Ruby on Rails scales. We've gone the easy route and merely followed what makes Yahoo!, LiveJournal, and other high-profile LAMP stacks scale high and mighty.

Take state out of the application servers and push it to database/memcached/shared network drive (that's the whole Shared Nothing thang). Use load balancers between your tiers, so you have load balancers -> web servers -> load balancers -> app servers -> load balancers -> database/memcached/shared network drive servers. (Past the entry point, load balancers can just be software, like haproxy).

In a setup like that, you can add almost any number of web and app servers without changing a thing.

Scaling the database is the "hard part", but still a solved problem. Once you get beyond what can be easily managed by a descent master-slave setup (and that'll probably take millions and millions of pageviews per day), you start doing partitioning.

Users 1-100K on cluster A, 100K-200K on cluster B, and so on. But again, this is nothing new. LiveJournal scales like that. I hear eBay too. And probably everyone else that has to deal with huge numbers.

So the scaling part is solved. What's left is judging whether the economics of it are sensible to you. And that's really a performance issue, not a scalability one.

If your app server costs $500 per month (like our dual xeons does) and can drive 30 requests/second on Rails and 60 requests/second on Java/PHP/.NET/whatever (these are totally arbitrary numbers pulled out of my...), then you're faced with the cost of $500 for 2.6 million requests/day on the Rails setup and $250 for the same on the other one.

Now. How much is productivity worth to you? Let's just take a $60K/year programmer. That's $5K/month. If you need to handle 5 million requests/day, your programmer needs to be 10% more productive on Rails to make it even. If he's 15% more productive, you're up $250. And this is not even considering the joy and happiness programmers derive from working with more productive tools (nor that people have claimed to be many times more productive).

Of course, the silly math above hinges on the assumption that the whatever stack is twice as fast as Rails. That’s a very big if. And totally dependent on the application, the people, and so on. Some have found Rails to be as fast or faster than comparable “best-of-breed J2EE stacks” — see http://weblog.rubyonrails.com/archives/2005/04/04/justingehtland-is-back-with-numbers-to-back-it-up/

The point is that the cost per request is plummeting, but the cost of programming is not. Thus, we have to find ways to trade efficiency in the runtime for efficiency in the “thought time” in order to make the development of applications cheaper. I believed we’ve long since entered an age where simplicity of development and maintenance is where the real value lies.
David Heinemeier Hansson
Tuesday, July 12, 2005
分享到:
评论

相关推荐

    lis3dhh_STdC.zip

    标题中的"lis3dhh_STdC.zip"很可能是指一个包含有关STMicroelectronics(意法半导体)的 lis3dhh传感器驱动或数据手册的压缩文件。这个传感器可能是一款三轴加速度计,常用于移动设备、物联网(IoT)装置、健康与健身...

    Agile Web Development with Rails 4

    Rails 4无疑会包含许多对之前版本的改进,作者们将这些最新的变化反映在这本书的最新版本中,确保开发者能够及时掌握Rails的最新技术趋势。 书籍由Sam Ruby、Dave Thomas和David Heinemeier Hansson撰写。Sam Ruby...

    DHH-Revamped

    1. **Ruby on Rails**:DHH是Rails的创始人,因此"DHH-Revamped"可能与Rails的更新或增强有关。这可能涉及到新功能的添加,性能优化,或者对现有API的改进,以提高开发效率和应用性能。 2. **Web开发**:任何与DHH...

    Ruby on Rails 初体验--北大青鸟教师专题讲座PPT

    直到2004年,随着David Heinemeier Hansson(DHH)创建的RoR框架的推出,Ruby才逐渐崭露头角,成为Web开发领域的热门选择。RoR框架的出现迅速改变了Web应用的开发格局,使得复杂的Web应用能在较短时间内被构建出来。...

    使用 rails进行敏捷开发(第三版)

    Rails的许多设计原则和工具都直接支持这种敏捷工作流程,如自动化测试、DHH(David Heinemeier Hansson)提出的"约定优于配置"原则以及强大的开发工具如Rails console和Rails generator。 本书的英文版可能包含以下...

    Ruby on Rails敏捷开发最佳实践源代码

    Rails的许多设计原则和默认设置都支持敏捷开发,如DHH(David Heinemeier Hansson)提出的"Convention over Configuration"(约定优于配置)理念,使得开发者可以更快地上手并减少配置工作。 1. **模型(Model)**...

    Youtube等视频共享应用程序,采用Ruby on Rails、Hotwire、Tailwind CSS构建.zip

    Hotwire是Rails社区的一个创新,由DHH(David Heinemeier Hansson,Ruby on Rails的创始人)推出,它旨在为Web应用提供更低延迟的用户体验,而无需依赖复杂的JavaScript框架。Hotwire的核心组件包括Turbo和 Stimulus...

    java餐桌点餐系统源码-yet-another-Chinese-translation-of-the-rails-doctrine:Rail

    DHH 的原文 和 @huacnlee 的译文,在这里对两位表示由衷的感谢! 译文中如有不当之处,欢迎指正。 Rails 信条 Ruby on Rails 能够现象般地崛起并取得如此卓越的成就,很大程度上应归功于其对新技术的运用及切入的...

    视频图matlab代码-DHH:Caffe实现我们的TIP2019作品DHH,题为“用于面部视频检索的深度异构哈希”

    对Caffe的修改 在将视频剪辑转换为lmdb格式的工具中添加convert_imageset_set 在工具中添加extract_features_binary,该工具将训练模型的一层的输出提取到二进制文件中 修改后的db,db_leveldb,db_lmdb,data_...

    Turbulence2D_1.2.5

    在实际使用中,用户需要熟悉流体力学的基本概念,理解软件的输入输出参数,以及如何解释模拟结果。对于科研工作者和工程师而言,Turbulence2D_1.2.5提供了一种强大的工具,帮助他们更好地理解和预测二维湍流现象,...

    textmate-rails-bundle:我为TextMate 2剥离的Rails捆绑包

    DHH Ruby TextMate捆绑包安装 git clone git://github.com/dhh/textmate-rails-bundle ~/Library/Application\ Support/TextMate/Bundles/dhh-ruby.tmbundle

    rails5_actioncable_demo_step_by_step:这是@dhh的ActionCable演示,每个步骤都是一个单独的提交

    自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本 系统依赖 配置 数据库创建 数据库初始化 如何运行测试套件 服务(作业队列,缓存服务器,搜索引擎等) ...

    程序员面试刷题的书哪个好-the-rails-doctrine:TheRailsDoctrine简体中文翻译

    需要更进一步地解释。我提议以下这篇内容,这是我们的基本信条,也是饱受争议的信条。 这篇信条,在过去 10 年里不断演进,是 Rails 主要的Struts,同时也是基本的Struts。我不自诩自己是这些想法的原创者。Rails 的...

    TextMate 2.0.23 fix 著名的文本编辑器

    包括DHH在内的Rails核心开发者一直都使用TextMate进行开发,原因就是他们主要都在使用Mac OS系统,并且TextMate具备出色的界面、强大的宏定义、以及可下载和编辑的宏定义包(bundles),这些都帮助开发者将编码的...

    rex:Rails 中的 React 示例

    新前端的一个关键要求是向 JavaScript 添加单元测试,希望达到团队可以练习一些(尽管 DHH 宣布 TDD 已死)。 其他指南对要采取的方向提供了相当多的见解。 Oliver Lance 的文章特别有用。 但是,它没有解决测试...

    dhh

    【标题】"dhh"可能是指David Heinemeier Hansson的缩写,他是一位著名程序员,创建了Ruby on Rails框架。然而,这个标题没有提供足够的信息来深入讨论具体的知识点,所以我们需要根据其他线索来推测。 【描述】"dhh...

    ror实例

    2. **ActiveRecord**:这是Rails中的ORM(对象关系映射),它允许开发者用Ruby类和对象操作数据库,减少了对SQL的直接依赖。 3. **路由(Routes)**:Rails的路由系统将HTTP请求映射到控制器的行动上,并定义了URL...

    DS-DHH800_1-CN

    DS-DHH800_1-CN 是一个与工控相关的单片机产品,它在工控自动化领域中具有重要作用。DS-DHH800_1-CN 单片机具有HART通讯协议的支持,并且与ABB品牌相关联,这表明它可能是一款适用于过程自动化和工业控制的通信设备...

    2009最新编程语言排名

    Rails由David Heinemeier Hansson(DHH)创建,它简化了Web应用的开发流程,提供了一种更为简洁高效的开发方式。Rails的出现不仅促进了Ruby语言的发展,也为整个Web开发领域带来了深远的影响。 ##### Rails对Ruby的...

Global site tag (gtag.js) - Google Analytics