什么是缩放? [英] What really is scaling?

查看:120
本文介绍了什么是缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说有人说他们制作了一个可扩展的网络应用程序..

I've heard that people say that they've made a scalable web application..

  1. 什么是缩放?

  1. What really is scaling?

开发人员可以做些什么来使他们的应用程序具有可扩展性?

What can be done by developers to make their application scalable?

开发人员在扩展过程中关注哪些因素?

What are the factors that are looked after by developers during scaling?

有关使用 asp.net 和 sql server 扩展 Web 应用程序的任何提示和技巧...

Any tips and tricks about scaling web applications with asp.net and sql server...

推荐答案

什么是缩放?

扩展是指应用程序的容量和/或使用量的增加.

Scaling is the increasing in capacity and/or usage of your application.

开发人员如何使他们的应用程序可扩展?

What do developers do to make their application scalable?

允许他们的应用垂直或水平扩展.

Either allow their applications to scale vertically or horizontally.

水平扩展是关于并行处理.

Horizontal scaling is about doing things in parallel.

垂直缩放是为了更快地做事.这通常意味着更强大的硬件.

Vertical scaling is about doing things faster. This typically means more powerful hardware.

通常当人们谈论水平可扩展性时,理想的情况是具有(近)线性可扩展性.这意味着如果一个 5000 美元的生产盒可以处理 2,000 个并发用户,那么再增加 4 个应该可以处理 10,000 个并发用户.越接近这个数字越好.

Often when people talk about horizontal scalability the ideal is to have (near-)linear scalability. This means that if one $5k production box can handle 2,000 concurrent users then adding 4 more should handle 10,000 concurrent users. The closer it is to that figure the better.

高度可扩展应用的理想选择是拥有近乎无限的近线性水平可扩展性,这样您只需插入另一个盒子,您的容量就会增加预期的数量,而收益很少或没有递减.

The ideal for highly scalable apps is to have near-limitless near-linear horizontal scalability such that you can just plug in another box and your capacity increases by an expected amount with little or no diminishing returns.

理想情况下,冗余也是等式的一部分,但这通常是一个单独的问题.

Ideally redundancy is part of the equation too but that's typically a separate issue.

这种可扩展性的典型代表当然是 Google.

The poster child for this kind of scalability is, of course, Google.

开发者在扩容过程中关注的因素有哪些?

What are the factors that are looked after by developers during scaling?

  • 应该规划多大的规模?没有必要在永远不会遇到的问题上花费时间和金钱;
  • 垂直扩展是否可行和/或经济?这是首选选项,因为它通常便宜得多(短期内);
  • 让您的应用程序水平扩展是否值得(通常是巨大的)成本?分布式/多线程应用明显更难编写且成本更高.
    • How much scale should be planned for? There's no point spending time and money on a problem you'll never have;
    • Is it possible and/or economical to scale vertically? This is the preferred option as it is typically much, much cheaper (in the short term);
    • Is it worth the (often significant) cost to enable your application to scale horizontally? Distributed/multithreaded apps are significantly more difficult and expensive to write.
    • 有关扩展 Web 应用程序的任何提示和技巧...

      Any tips and tricks about scaling web applications...

      是:

      1. 不要担心您永远不会遇到的问题;
      2. 不要太担心您不太可能遇到的问题.很可能事情在你拥有它们之前很久就已经改变了;
      3. 不要害怕丢掉代码并重新开始.自动化测试使这变得容易得多;和
      4. 从开发人员的时间成本的角度考虑.

      (4) 是一个关键点.你可能有一个写得不好的应用程序,需要 20,000 美元的硬件才能基本上修复.如今,20,000 美元可以购买很多的功能(64+GB 的 RAM、4 个四核 CPU 等),可能超过 99% 的人都需要.这样做是否更便宜,还是花费 6 个月重写和调试新应用以使其更快?

      (4) is a key point. You might have a poorly written app that will require $20,000 of hardware to essentially fix. Nowadays $20,000 buys a lot of power (64+GB of RAM, 4 quad core CPUs, etc), probably more than 99% of people will ever need. Is it cheaper just to do that or spend 6 months rewriting and debugging a new app to make it faster?

      这很容易成为第一个选项.

      It's easily the first option.

      所以我将在我的列表中添加另一个项目:务实.

      So I'll add another item to my list: be pragmatic.

      这篇关于什么是缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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