当流量繁忙时,为什么Google App Engine Dynamic Instances重新启动



我正在监视Google App Engine,并发现当流量大约10-20个并发用户,并且实例的内存达到了约300m的点,Google App Engine重新启动/重新调整实例本身!关键是它打破了实例重新启动时导致非常缓慢的延迟的性能,我很有趣,为什么GAE在流量时重新启动应用程序引擎,我正在动态实例(自动缩放)上运行。希望任何人都有相同的经验可以解释。

在此处找到答案:https://cloud.google.com/appengine/docs/flexible/go/how-instances-are-managed

根据以下方式调整配置之后:https://cloud.google.com/appengine/docs/flexible/go/configuring-your-app-with-with-with-papp-yaml#health_checks

对于java,放入appengine-web.xml:

<health-check>
    <enable-health-check>true</enable-health-check>
    <check-interval-sec>300</check-interval-sec>
    <timeout-sec>60</timeout-sec>
    <unhealthy-threshold>3</unhealthy-threshold>
    <healthy-threshold>1</healthy-threshold>
</health-check>

这会减少实例重新启动的机会,当时有重量的用户,Origin设置太容易触发阈值并使GAE过于频繁地重新启动实例并避免实例重新启动引起的性能。

最新更新