实例需要很长时间才能启动

时间:2022-10-19 18:56:04

I have an app engine application with some services being based on webapp2 framework and some service being based on endpoints-v2 framework.

我有一个应用程序引擎应用程序,其中一些服务基于webapp2框架,一些服务基于端点-v2框架。

The issue that i am facing over is that some time the OPTIONS request being sent from front end takes a huge amount of time get the response back which varies from 10 secs to 15 secs which is adding latency to my entire application. On digging down deeper into the issue and found the it is due to instance startup time that is costing us this much latency.

我面临的问题是有时候从前端发送OPTIONS请求需要花费大量时间才能得到响应,从10秒到15秒不等,这增加了整个应用程序的延迟。深入挖掘问题并发现它是由于实例启动时间导致我们这么多延迟。

So my question is Does starting up an instance takes this much of time ? If not then how can i reduce my startup time for instances ? How the instances start so that i can optimise those situations in my code?

所以我的问题是启动实例需要花费这么多时间吗?如果没有,那么我如何减少实例的启动时间?实例如何启动,以便我可以在我的代码中优化这些情况?

1 个解决方案

#1


0  

Java instance takes a long time to spin up. You can hide the latency by configuring warmup request and min-idle-instances (see here) in your appengine-web.xml.

启动Java实例需要很长时间。您可以通过在appengine-web.xml中配置预热请求和min-idle-instances(请参阅此处)来隐藏延迟。

#1


0  

Java instance takes a long time to spin up. You can hide the latency by configuring warmup request and min-idle-instances (see here) in your appengine-web.xml.

启动Java实例需要很长时间。您可以通过在appengine-web.xml中配置预热请求和min-idle-instances(请参阅此处)来隐藏延迟。