GAE/J上的最小空闲实例 [英] min-idle-instance on GAE/J

查看:59
本文介绍了GAE/J上的最小空闲实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于GAE/J上的<min-idle-instance>,哪种理解是正确的?

Regarding as <min-idle-instance> on GAE/J, which understanding is correct?

appengine-web.xml

appengine-web.xml

 <automatic-scaling>
    <min-idle-instances>1</min-idle-instances>
 </automatic-scaling>

  1. min-idle-instance是该应用没有流量的实例数.
  1. min-idle-instance is the number of instances when the app has no traffic.

即使应用程序没有流量,也存在一个常驻实例.如果有对应用程序的请求传入,则驻留实例将为流量提供服务.在流量超过常驻实例的容量之前,不会创建新实例.

One resident instance exists even when the app has no traffic. If a request to the app is coming in, the resident instance serves the traffic. New instances will be not created until the the traffic exceeds the capacity of the resident instance.

  1. min-idle-instance是服务请求以外的实例数(正在调用新实例除外).
  1. min-idle-instance is the number of instances other than the serving requests (except a new instance is invoking).

即使应用程序没有流量,也存在一个常驻实例.如果有对应用程序的请求传入,则驻留实例将为流量提供服务.同时,将创建一个新的动态实例以创建一个不为请求服务的实例(为增加流量做准备).

One resident instance exists even when the app has no traffic. If a request to the app is coming in, the resident instance serves the traffic. At the same time a new dynamic instance will be created to make a instance that does not serve requests (preparing for traffic increase).

=================

=================

如果需要N实例来处理请求,则1.上将有N个实例(N为0除外),2.上将有N+1个实例.

If N instances are needed for serving requests, there will be N instances (except N is 0) on 1., there will be N+1 instances on 2..

哪个1.2.是正确的?

推荐答案

您的2.描述更接近现实.

Your 2. description is closer to reality.

常驻实例的作用不是定期处理流量.当流量超过正在运行的动态实例的容量时,它们只会在短时间内处理溢出流量,而GAE会启动其他动态实例.

The role of the resident instances is not to handle traffic regularly. They only handle overflow traffic for short periods of time when the traffic exceeds the capacity of the running dynamic instances, while GAE spins up additional dynamic instances.

常驻实例的数量决定了应用程序能够处理的流量峰值的大小,而不会显着增加响应延迟.

The number of resident instances determines the size of the traffic peaks that the app will be able to handle without significantly increasing the response latency.

这篇关于GAE/J上的最小空闲实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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