1
votes

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

appengine-web.xml

 <automatic-scaling>
    <min-idle-instances>1</min-idle-instances>
 </automatic-scaling>
  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 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).

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

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..

Which 1. or 2. is correct?

1

1 Answers

1
votes

Your 2. description is closer to reality.

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.