什么是缩放?

发布于 2024-08-16 06:31:48 字数 118 浏览 2 评论 0原文

我总是收到反对 RoR 的论点,认为它无法扩展,但我从未得到任何适当的答案,这到底意味着什么?那么这里有一个新手问,这个“缩放”到底是什么以及如何衡量它?

I always get this argument against RoR that it dont scale but I never get any appropriate answer wtf it really means? So here is a novice asking, what the hell is this " scaling " and how you measure it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

请远离我 2024-08-23 06:31:48

这个“缩放”到底是什么……

作为一个通用术语,可扩展性< /strong> 表示项目对不同类型需求的响应能力。一个可扩展性良好的项目在满足更多服务请求时不会遇到任何问题,或者至少不必因为无法处理请求而开始拒绝这些请求。

通常情况下,仅仅将问题的规模增加一两个数量级就会暴露出用于解决问题的策略的弱点。当这些弱点暴露出来时,可能会说问题的解决方案“无法很好地扩展”。

例如, bogo sort 很容易实现,但只要你要对很多东西进行分类,开始需要很长时间才能得到你想要的答案。公平地说,bogo 排序的扩展性不好。

...你如何衡量它?

这是一个更难回答的问题。一般来说,没有与可扩展性相关的单元;诸如“该系统的可扩展性是这个系统的 N 倍”之类的陈述充其量只是苹果与橘子的比较。

可扩展性最常通过查看系统在测试条件下满足不同类型需求的情况来衡量。人们可能会说,如果一个系统能够满足各种不同类型的需求,那么它就可以很好地扩展。如果它能够满足目前尚未遇到的需求,但如果受欢迎程度突然飙升,则可能会出现这种情况,这一点尤其正确。 (想想Slashdot/Digg/Reddit 效果。)

What the hell is this "scaling"...

As a general term, scalability means the responsiveness of a project to different kinds of demand. A project that scales well is one that doesn't have any trouble keeping up with requests for more of its services -- or, at the least, doesn't have to start turning away requests because it can't handle them.

It's often the case that simply increasing the size of a problem by an order of magnitude or two exposes weaknesses in the strategies that were used to solve it. When such weaknesses are exposed, it might be said that the solution to the problem doesn't "scale well".

For example, bogo sort is easy to implement, but as soon as you're sorting more than a handful of things, it starts taking a very long time to get the answer you want. It would be fair to say that bogo sort doesn't scale well.

... and how you measure it?

That's a harder question to answer. In general, there aren't units associated with scalability; statements like "that system is N times as scalable as this one is" at best would be an apples-to-oranges comparison.

Scalability is most frequently measured by seeing how well a system stands up to different kinds of demand in test conditions. People might say a system scales well if, over a wide range of demand of different kinds, it can keep up. This is especially true if it stands up to demand that it doesn't currently experience, but might be expected to if there's a sudden surge in popularity. (Think of the Slashdot/Digg/Reddit effects.)

自演自醉 2024-08-23 06:31:48

规模化或可伸缩性是指项目如何发展或扩展以响应需求:

http://en.wikipedia .org/wiki/可扩展性

Scaling or scalability refers to how a project can grow or expand to respond to the demand:

http://en.wikipedia.org/wiki/Scalability

深居我梦 2024-08-23 06:31:48

正如维基百科所指出的,可扩展性有广泛的用途:

可扩展性可以从多个维度来衡量,例如:

  • 负载可扩展性:分布式系统能够轻松地
    扩大和缩小其资源库
    以适应更重或更轻的
    负载。或者,轻松地使用
    系统或组件可以是
    修改、添加或删除,以
    适应不断变化的负载。
  • 地理可扩展性:保持绩效的能力,
    有用性或可用性,无论
    从集中扩张
    局部区域到更分散的区域
    地理格局。
  • 管理可扩展性:能够容纳越来越多的人员
    组织轻松共享单个
    分布式系统。
  • 功能可扩展性:通过以下方式增强系统的能力:
    最少添加新功能
    努力。

在我工作的一个领域,随着处理器数量的增加,我们关注高吞吐量和并行计算的性能。

更普遍的是,人们经常发现,将问题增加(比如说)一个或两个数量级会带来一系列全新的挑战,而这些挑战很难从较小的系统中预测出来。

Scalability has a wide variety of uses as indicated by Wikipedia:

Scalability can be measured in various dimensions, such as:

  • Load scalability: The ability for a distributed system to easily
    expand and contract its resource pool
    to accommodate heavier or lighter
    loads. Alternatively, the ease with
    which a system or component can be
    modified, added, or removed, to
    accommodate changing load.
  • Geographic scalability: The ability to maintain performance,
    usefulness, or usability regardless of
    expansion from concentration in a
    local area to a more distributed
    geographic pattern.
  • Administrative scalability: The ability for an increasing number of
    organizations to easily share a single
    distributed system.
  • Functional scalability: The ability to enhance the system by
    adding new functionality at minimal
    effort.

In one area where I work we are concerned with the performance of high-throughput and parallel computing as the number of processors is increased.

More generally it is often found that increasing the problem by (say) one or two orders of magnitude throws up a completely new set of challenges which are not easily predictable from the smaller system

娜些时光,永不杰束 2024-08-23 06:31:48

它是一个术语,表示系统随着时间的推移保持其性能的能力。

理想情况下,您想要的是一个能够实现线性可扩展性的系统。这意味着通过添加新的资源单位,系统的执行能力同样会增长。

例如:这意味着,当三个 webapp 服务器可以处理一千个并发用户时,通过添加三个更多服务器,它可以处理双倍的数量,即两千个并发用户在这种情况下同样如此

如果系统不具有线性可扩展性,那么在某个点上添加更多资源(例如硬件)不会带来任何额外的好处,例如性能会收敛到零:随着越来越多的服务器投入到任务中。在上面的例子中,每台新服务器的额外收益变得越来越小,直到达到零。

因此,可扩展性是告诉您从给定输入获得什么输出的因素。理论上它的取值范围在0到正无穷大之间。实际上,任何等于 1 的值都是最理想的......

It is a term for expressing the ability of a system to keep its performance as it grows over time.

Ideally what you want, is a system to reach linear scalability. It means that by adding new units of resources, the system equally grows in its ability to perform.

For example: It means, that when three webapp servers can handle a thousand concurrent users, that by adding three more servers, it can handle double the amount, two thousand concurrent users in this case and no less.

If a system does not have the property of linear scalability, there is a point where adding more resources, e.g. hardware, will not bring any additional benefit, performance, for instance, converges to zero: As more and more servers are put to the task. In the above example, the additional benefit of each new server becomes smaller and smaller until it reaches zero.

Thus, scalability is the factor that tells you what you get as output from a given input. It's value range lies between 0 and positive infinity, in theory. In practice, anything equal to 1 is most desirable...

他夏了夏天 2024-08-23 06:31:48

可扩展性是指系统适应不断变化的用户数量的能力。这可能是用户数量的增加或减少,因为我们现在尝试围绕云计算和租用的计算时间来规划我们的系统。

想一想,要使专为 1000 名代表规模设计的订单输入系统容纳 100,000 名代表,需要涉及哪些内容。需要添加什么硬件?数据库怎么样?简而言之,这就是可扩展性。

Scalability refers to the ability for a system to accomodate a changing number of users. This can be an increasing or decreasing number of users as we now try to plan our systems around cloud computing and rented computing time.

Think about what is involved in making an order entry system designed for 1000 reps scale to accomodate 100,000 reps. What hardware needs to be added? What about the databases? In a nutshell, this is scalability.

人生戏 2024-08-23 06:31:48

应用程序的可扩展性是指当应用程序的负载发生变化时它能够如何执行。这通常受到连接用户数量、数据库中数据量等的影响。

Scalability of an application refers to how it is able to perform as the load on the application changes. This is often affected by the number of connected users, amount of data in a database, etc.

路弥 2024-08-23 06:31:48

它是系统接受增加的工作负载、更多功能、更改数据库......而不影响原始设计或系统的能力。

It is the ability for a system to accept an increased workload, more functionality, changing database, ... without impacting the original design or system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文