简体   繁体   English

可扩展性和弹性之间有什么区别?

[英]What is the difference between scalability and elasticity?

I've heard many people using both terms interchangeably.我听说很多人可以互换使用这两个术语。 However, in my opinion there is difference between them:但是,在我看来,它们之间是有区别的:

SCALABILITY<\/strong> - ability of a software system<\/em> to process higher amount of workload on its current hardware resources ( scale up<\/em> ) or on current and additional hardware resources ( scale out<\/em> ) without application service interruption;可扩展<\/strong>性——软件系统<\/em>在其当前硬件资源(纵向扩展<\/em>)或当前和额外的硬件资源(横向扩展<\/em>)上处理更多工作负载而不中断应用程序服务的能力;

ELASTICITY<\/strong> - ability of the hardware layer<\/em> below (usually cloud infrastructure) to increase or shrink the amount of the physical resources offered by that hardware layer to the software layer above.弹性<\/strong>——下面的硬件层<\/em>(通常是云基础设施)增加或缩小该硬件层提供给上面的软件层的物理资源量的能力。 The increase \/ decrease is triggered by business rules defined in advance (usually related to application's demands).增加\/减少由预先定义的业务规则触发(通常与应用程序的需求相关)。 The increase \/ decrease happens on the fly without physical service interruption.增加\/减少在没有物理服务中断的情况下即时发生。

Again, scalability is a characteristic of a software architecture related to serving higher amount if workload, where elasticity is a characteristic of the physical layer below, entirely related to hardware budget optimizations.同样,可扩展性是软件架构的一个特征,它与服务更高数量的工作负载相关,其中弹性是下面物理层的一个特征,与硬件预算优化完全相关。

Have I got the difference between these two non-functional architectural characteristics right?我对这两个非功能性架构特征有区别吗? May someone give specific examples, so we could draw more distinctive border between these two terms?有人可以举出具体的例子,以便我们可以在这两个术语之间划出更鲜明的界限吗?

"

Scalability is the ability of the system to accommodate larger loads just by adding resources either making hardware stronger (scale up) or adding additional nodes (scale out).可扩展性是系统仅通过添加资源使硬件更强大(向上扩展)或添加额外节点(向外扩展)来适应更大负载的能力。

Elasticity is the ability to fit the resources needed to cope with loads dynamically usually in relation to scale out.弹性是适应动态处理负载所需的资源的能力,通常与横向扩展有关。 So that when the load increases you scale by adding more resources and when demand wanes you shrink back and remove unneeded resources.因此,当负载增加时,您可以通过添加更多资源进行扩展,而当需求减弱时,您会收缩并移除不需要的资源。 Elasticity is mostly important in Cloud environments where you pay-per-use and don't want to pay for resources you do not currently need on the one hand, and want to meet rising demand when needed on the other hand.弹性在云环境中非常重要,在这种环境中,您按使用付费,一方面不想为当前不需要的资源付费,另一方面又希望在需要时满足不断增长的需求。

_ _

Scalability: "Increasing" the capacity to meet the "increasing" workload.可扩展性: “增加”满足“增加”工作量的能力。

Elasticity: "Increasing or reducing" the capacity to meet the "increasing or reducing" workload.弹性: “增加或减少”满足“增加或减少”工作量的能力。


Scalability: In a scaling environment, the available resources may exceed to meet the "future demands".可扩展性:在可扩展的环境中,可用资源可能会超过以满足“未来需求”。

Elasticity: In the elastic environment, the available resources match the "current demands" as closely as possible.弹性:在弹性环境中,可用资源尽可能与“当前需求”匹配。


Scalability: Scalability adapts only to the "workload increase" by "provisioning" the resources in an "incremental" manner.可扩展性:可扩展性仅通过以“增量”方式“供应”资源来适应“工作负载增加”。

Elasticity: Elasticity adapts to both the "workload increase" as well as "workload decrease" by "provisioning and deprovisioning" resources in an "autonomic" manner.弹性:弹性通过以“自主”方式“供应和取消供应”资源来适应“工作量增加”和“工作量减少”。


Scalability: Increasing workload is served with increasing the power of a single computer resource or with increasing the power by a group of computer resources.可扩展性:通过增加单个计算机资源的能力或通过增加一组计算机资源的能力来增加工作量。

Elasticity: Varying workload is served with dynamic variations in the use of computer resources.弹性:随着计算机资源使用的动态变化,为不同的工作负载提供服务。


Scalability: Scalability enables a corporate to meet expected demands for services with "long-term, strategic needs".可扩展性:可扩展性使公司能够满足对具有“长期战略需求”的服务的预期需求。

Elasticity: Elasticity enables a corporate to meet unexpected changes in the demand for services with "short-term, tactical needs".弹性:弹性使企业能够通过“短期、战术需求”来满足服务需求的意外变化。


Scalability: It is "increasing" the capacity to serve an environment where workload is increasing.可扩展性:它正在“增加”为工作负载不断增加的环境提供服务的能力。

This scalability could be "Scaling Up" or "Scaling Out".这种可扩展性可以是“向上扩展”或“向外扩展”。

(Example: (例子:

Scaling Up - increasing the ability of an individual server向上扩展 - 提高单个服务器的能力

Scaling out - increasing the ability by adding multiple servers to the individual server.)横向扩展 - 通过向单个服务器添加多个服务器来提高能力。)

Elasticity: It is the ability to "scale up or scale down" the capacity to serve at will.弹性:是能够随意“放大或缩小”服务能力。


Scalability: To use a simile, "scaling up" is an individual increasing her power to meet the increasing demands, and "scaling out" is building a team to meet the increasing demands.可扩展性:用一个比喻来说,“向上扩展”是一个人增加她的力量来满足日益增长的需求,而“向外扩展”是建立一个团队来满足日益增长的需求。

Elasticity: To use a simile, a film actor increasing or reducing her body weight to meet differing needs of the film industry.弹性:用一个比喻,电影演员增加或减少她的体重,以满足电影业的不同需求。

_ _

Usually, when someone says a platform or architectural scales , they mean that hardware costs increase linearly with demand.通常,当有人说平台或架构可扩展时,他们的意思是硬件成本随需求线性增加。 For example, if one server can handle 50 users, 2 servers can handle 100 users and 10 servers can handle 500 users.例如,如果一台服务器可以处理 50 个用户,则 2 个服务器可以处理 100 个用户,10 个服务器可以处理 500 个用户。 If every 1,000 users you get, you need 2x the amount of servers, then it can be said your design does not scale, as you would quickly run out of money as your user count grew.如果每获得 1,000 个用户,您需要 2 倍的服务器数量,那么可以说您的设计无法扩展,因为随着用户数量的增加,您的资金很快就会耗尽。

Elasticity is used to describe how well your architecture can adapt to workload in real time.弹性用于描述您的架构实时适应工作负载的能力。 For example, if you had one user logon every hour to your site, then you'd really only need one server to handle this.例如,如果您每小时有一个用户登录您的站点,那么您实际上只需要一台服务器来处理这个问题。 However, if all of a sudden, 50,000 users all logged on at once, can your architecture quickly (and possibly automatically) provision new web servers on the fly to handle this load?然而,如果突然间有 50,000 名用户同时登录,您的架构能否快速(并且可能自动)即时提供新的 Web 服务器来处理这种负载? If so, it could be said that your design is elastic .如果是这样,可以说您的设计是有弹性的

In terms of AWS :AWS 方面

Scalability refers to the ability for your resources to increase or decrease in size or quantity.可扩展性是指您的资源在大小或数量上增加或减少的能力。

There's a lot of infrastructures involved to make something like this happen, so it's no easy task.有很多基础设施可以让这样的事情发生,所以这不是一件容易的事。

Many of the services in AWS are scalable by default, which is one of the reasons that AWS is so successful. AWS 中的许多服务默认都是可扩展的,这也是 AWS 如此成功的原因之一。

Scalability is pretty simple to define, which is why some of the aspects of elasticity are often attributed to it.可扩展性的定义非常简单,这就是为什么弹性的某些方面通常归因于它的原因。


Elasticity is the ability for your resources to scale in response to stated criteria, often CloudWatch rules.弹性是您的资源根据规定的标准(通常是CloudWatch规则)进行扩展的能力。

This is what happens when a load balancer adds instances whenever a web application gets a lot of traffic.这就是当 Web 应用程序获得大量流量时负载均衡器添加实例时发生的情况。

Scalability is required for elasticity, but not the other way around.弹性需要可扩展性,反之则不然。

Not all AWS services support elasticity, and even those that do often need to be configured in a certain way.并非所有 AWS 服务都支持弹性,即使是那些经常需要以某种方式配置的服务。

It might seem redundant, but the services in AWS that start with "Elastic" often support elasticity.这似乎是多余的,但 AWS 中以“弹性”开头的服务通常支持弹性。

-- ——

In resume , Scalability gives you the ability to increase or decrease your resources, and elasticity lets those operations happen automatically according to configured rules.在 resume 中,Scalability 使您能够增加或减少资源,而弹性则让这些操作根据配置的规则自动发生。

One picture is worth a thousand words.一张照片值一千字。 I found it in Fundamentals of Software Architecture: An Engineering Approach by Mark Richards and Neal Ford.我在 Mark Richards 和 Neal Ford的《软件架构基础:一种工程方法》中找到了它。

在此处输入图片说明

弹性与服务或应用程序的短期需求及其变化有关,但可扩展性支持长期需求。

Elasticity is the ability of a system to increase (or decrease) its compute, storage, netowrking, etc. capacity based on specified criteria such as the total load on the system.弹性是系统根据指定标准(例如系统上的总负载)增加(或减少)其计算、存储、网络等容量的能力。

For example, you can implement a backend system that initially has 1 server in its cluster but configure it to add an extra instance to the cluster if the average per minute CPU utilization of all the servers in the cluster exceeds a given threshold (eg 70%).例如,您可以实现一个后端系统,该系统最初在其集群中有 1 个服务器,但如果集群中所有服务器的平均每分钟 CPU 利用率超过给定阈值(例如 70% )。

Similarly, you can configure your system to remove servers from the backend cluster if the load on the system decreases and the average per-minute CPU utilization goes below a threshold defined by you (eg 30%).类似地,如果系统负载降低并且平均每分钟 CPU 利用率低于您定义的阈值(例如 30%),您可以将系统配置为从后端集群中删除服务器。

As another example, you can configure your system to increase the total disk space of your backend cluster by an order of 2 if more than 80% of the total storage currently available to it is used.再举一个例子,如果使用了超过 80% 的当前可用存储空间,您可以将系统配置为将后端集群的总磁盘空间增加 2 倍。 If for whatever reason, at a later point, data is deleted from the storage and, say, the total used storage goes below 20%, you can decrease the total available disk space to its original value.如果以后出于某种原因,数据从存储中删除,并且总已用存储低于 20%,您可以将可用磁盘空间总量减少到其原始值。

But some systems (eg legacy software) are not distributed and maybe they can only use 1 CPU core.但是有些系统(例如遗留软件)不是分布式的,它们可能只能使用 1 个 CPU 内核。 So even though you can increase the compute capacity available to you on demand, the system cannot use this extra capacity in any shape or form.因此,即使您可以按需增加可用的计算容量,系统也无法以任何形式使用此额外容量。 Such systems are not scalable .此类系统不可扩展 But a scalable system can use increased compute capacity and handle more load without impacting the overall performance of the system.但是可扩展的系统可以使用更高的计算能力并处理更多负载,而不会影响系统的整体性能。

A scalable system does not depend on elasticity though.可扩展的系统并不依赖于弹性。 Traditionally, IT departments could replace their existing servers with newer servers that had more CPUs, RAM, and storage and port the system to the new hardware to employ the extra compute capacity available to it.传统上,IT 部门可以使用具有更多 CPU、RAM 和存储空间的更新服务器替换其现有服务器,并将系统移植到新硬件以利用可用的额外计算容量。

Cloud environments (AWS, Azure, Google Cloud, etc.) offer elasticity and some of their core services are also scalable out of the box.云环境(AWS、Azure、Google Cloud 等)提供了弹性,并且它们的一些核心服务也是开箱即用的。 Furthermore, if you build a scalable software, you can deploy it to these cloud environments and benefit from the elastic infrastructure they provide you to automatically increase/decrease the compute resources available to you on-demand.此外,如果您构建了一个可扩展的软件,您可以将其部署到这些云环境中,并从它们为您提供的弹性基础设施中受益,自动按需增加/减少可用的计算资源。

Scalability handles the increase and decrease of resources according to the system's workload demands.可伸缩性根据系统的工作负载需求处理资源的增加和减少。 So scalability does not have to be done automatically.所以可扩展性不必自动完成。

Elasticity is the ability to automatically or dynamically increase or decrease the resources as needed.弹性是根据需要自动或动态增加或减少资源的能力。 Elastic resources match the current needs and resources are added or removed automatically to meet future demands when it is needed.弹性资源与当前需求相匹配,并在需要时自动添加或删除资源以满足未来的需求。

So in short ability of a system to handle Scalability automatically is elasticity所以简而言之,系统自动处理可扩展性的能力就是弹性

From my limited understanding of those concepts, an example:根据我对这些概念的有限理解,举个例子:

Say we have a system of 5 computers that does 5 work units, if we need one more work unit to be done we we'll have to use one more computer.假设我们有一个由 5 台计算机组成的系统,可以执行 5 个工作单元,如果我们还需要完成一个工作单元,我们将不得不再使用一台计算机。 That is a scalable system but it is not elastic.这是一个可扩展的系统,但它没有弹性。 Somebody going to have to go and get that other computer.有人将不得不去拿另一台计算机。 Also, if a new computer is purchased and the extra work unit is not needed any more, the system get stuck with a redundant resource.此外,如果购买了一台新计算机并且不再需要额外的工作单元,系统就会陷入冗余资源的困境。

Now, lets say that the same system uses, instead of it's own computers, a cloud service that is suited for it's needs.现在,假设同一个系统使用的是适合其需求的云服务,而不是它自己的计算机。 Ideally, when the workload is up one work unit the cloud will provide the system with another "computing unit", when workload goes back down the cloud will gracefully stop providing that computing unit.理想情况下,当工作负载上升到一个工作单元时,云将为系统提供另一个“计算单元”,当工作负载下降时,云将优雅地停止提供该计算单元。 That is a situation where a system is both scalable and elastic.在这种情况下,系统既可扩展又具有弹性。

Scalability and Elasticity both refer to meeting traffic demand but in two different situations.可扩展性和弹性都是指满足流量需求,但在两种不同的情况下。

Scalability is meeting predictable traffic demand while elasticity is meeting sudden traffic demand.可扩展性满足可预测的流量需求,而弹性满足突然的流量需求。

在此处输入图片说明

image ref: https://www.skylinesacademy.com/blog/2020/3/6/az-900-cloud-concepts-scalability-and-elasticity图片参考: https : //www.skylinesacademy.com/blog/2020/3/6/az-900-cloud-concepts-scalability-and-elasticity

Both, Scalability and Elasticity refer to the ability of a system to grow and shrink in capacity and resources and to this extent are effectively one and the same.可扩展性和弹性都指系统在容量和资源方面增长和收缩的能力,在这个程度上实际上是相同的。 The difference is usually in needs and conditions under which this happens.差异通常在于发生这种情况的需求和条件。 Scalability is mostly manual, predictive and planned for expected conditions.可扩展性主要是手动的、预测的和针对预期条件的计划。 Elasticity is automatic and reactive to external stimuli and conditions.弹性是自动的,对外部刺激和条件具有反应性。 Elasticity is automatic scalability in response to external conditions and situations.弹性是响应外部条件和情况的自动可扩展性。

"

这个链接提供了很多关于 Cloud AZ-900<\/a>的好概念

"

Trying to Simplify as much as it could be:尽量简化:

Scalability可扩展性

It is like how much resources you can "add" or how much each resource (already added) can be made "bigger".这就像您可以“添加”多少资源或每个资源(已添加)可以“变大”多少。

For example:例如:

We have 4 GB ram PC & for some reason its not enough and we want 8 GB ram.我们有 4 GB 内存 PC,出于某种原因,这还不够,我们想要 8 GB 内存。 Now we have two options,现在我们有两个选择,

  1. we could either get another 4 GB ram and "add" it with previous 4 GB ram chip.我们可以得到另一个 4 GB ram 并用之前的 4 GB ram 芯片“添加”它。 Together these become 8 GB这些一起变成 8 GB
  2. OR we could simply get 8 GB ram chip and replace it with previous one.或者我们可以简单地获得 8 GB ram 芯片并将其替换为以前的芯片。 Effectively we made our ram "bigger" with new 8 GB chip.我们用新的 8 GB 芯片有效地使我们的内存“更大”。

"Add" -> Scale Out “添加”->扩展

"Bigger" -> Scale Up (think of weighing scale, if its heavy the scale goes up :) “做大” - >扩大规模(认为秤的,如果它的重规模上升:)


Elasticity弹性

It is "how fast" or "how much" you can increase or decrease a given resource or a group of resources.它是您可以增加或减少给定资源或一组资源的“多快”或“多少”。

Just think of rubber band, we have got two rubber bands, 1 can "stretch" more & another can stretch less.想想橡皮筋,我们有两个橡皮筋,一个可以“拉伸”更多,另一个可以更少拉伸。 We say the first one is "more elastic".我们说第一个是“更有弹性”。

If you are physics student: Think in terms of inertia.如果你是物理系的学生:从惯性的角度思考。 How easily and how much a object can move or expand..物体移动或膨胀的容易程度和程度。

If you are cloud student: How quickly and by How much allocated resources could "expand" or "shrink" given the load on application.如果您是云学生:鉴于应用程序的负载,分配的资源可以“扩展”或“收缩”的速度和程度。


(I hope atleast some of it helps. I didnot want to use any bookish language.) (我希望至少有一些帮助。我不想使用任何书本式的语言。)

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

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