简体   繁体   English

如果我不扩展我的应用程序或数据库服务器并增加负载,会发生什么情况?

[英]What will happen if I don't scale my application or database servers and I increase the load?

I understand horizontal scaling, vertical scaling, sharding, I want to gain more understanding on what will happen to the application ie the effects of not scaling over how I can solve the problem by scaling.我了解水平缩放、垂直缩放、分片,我想更多地了解应用程序会发生什么,即不缩放的影响如何通过缩放解决问题。

Here are my doubts,这是我的疑惑,

  1. What are all the possible things that can happen to the application if I don't scale.如果我不扩展,应用程序可能会发生什么事情。 For example, the application will slow down, the requests won't get served, or the application will go down.例如,应用程序会变慢,请求得不到服务,或者应用程序会停止运行。
  2. Let's say the system will slow down on increasing the load, why does that happen?假设系统会随着负载的增加而变慢,为什么会这样? If the requests don't get served why does that happen?如果请求没有得到满足,为什么会这样? Do threads come into the picture?线程会出现吗?
  3. If threads come into the picture, how does it do so?如果线程进入画面,它是如何做到的?

Generally, all requests have a timeout, these timeouts occur at most layer boundaries (Browser->HTTP server, HTTP Server -> Application Server / Microservices layer, Application -> Database).通常,所有请求都有超时,这些超时发生在大多数层边界(浏览器->HTTP 服务器、HTTP 服务器-> 应用程序服务器/微服务层、应用程序-> 数据库)。 When your load increases to the point where some layer cannot service the request before that timeout occurs, the user will not get a response, and the application will be broken当您的负载增加到某个层无法在超时发生之前为请求提供服务时,用户将得不到响应,并且应用程序将被破坏

Depending on where the timeout occurs, you may send a useful error, or it could be a generic "hang" where the application appears to be frozen or broken in some way.根据超时发生的位置,您可能会发送一个有用的错误,或者它可能是一个通用的“挂起”,应用程序似乎以某种方式被冻结或损坏。

If enough requests are awaiting servicing, and you have turned up all the timeouts to an unreasonably high level, you may allow more and more threads to queue.如果有足够多的请求等待服务,并且您已将所有超时设置到不合理的高水平,您可能会允许越来越多的线程排队。 These threads use memory, and ultimately you will run out of memory and be unable to create additional threads, at which point the application will once again hang and become unresponsive.这些线程使用内存,最终您将耗尽内存并且无法创建额外的线程,此时应用程序将再次挂起并变得无响应。

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

相关问题 我可以通过哪些方式设计密钥来提高Redis Set性能? - What are some ways I can design my keys to increase redis set performance? 我应该使用什么数据库而不需要安装应用程序 - What database should I use that does not need an application to be installed 从数据库中指定关系可以得到什么? - What do I gain from specifying relationships in my database? 如何在MySQL数据库中存储音阶 - How do I store a musical scale in a MySQL database 我应该为数据库使用什么? - What should I use for a Database? 我为什么不能(或如何)使用WordPress API将NULL值插入我的MySQL数据库中 - Why can't I — or how do I — insert NULL values into my MySQL database using the WordPress API 如果我不想使用实体框架,如何使用 Visual Studio 进行图表优先的数据库设计和生成? - How to use Visual Studio for diagram-first database design and generation if I don't want to use Entity framework? 我在数据库中感到困惑 - I'm confused in my database 如何设计一个“我喜欢”和“我不喜欢”的系统? - How to design a “I like” and “I don't like” system? Web规模分析应用程序的数据库选择 - Database selection for a web-scale analytics application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM