Reserved instances and warm-up requests do not work

I could never get this to work correctly, and it was so unnerving: I set up the warm-up requests, but I never saw them go through, so about 10% of the requests cause the new instance to be deployed and will request 30 seconds or less . And because of the ongoing slowdown, sometimes these spins take longer than usual and time out, which is just awful. This is a spring application, so it starts very slowly, and I could probably optimize in less than 30 seconds, but besides ... I need warm-up requests to work, so the instances do not serve user requests until they are really ready.

Someone said that warm-up requests do not work if you do not have resident instances, which makes sense, so I signed up for 336 hours a week from the discounted instance hours, but after an hour I still do not see any reserved instances. Even if I kill all dynamic ones, new dynamic ones are created.

So, my specific question is: do I need to do something to install reserved instances? and as soon as they appear, will warm-up requests be executed?

My app settings:

Idle Instances: auto-auto

Expected Delay: 5s-10s

Configurable Services: Heating Requests

AppEngine-web.xml:

<warmup-requests-enabled>true</warmup-requests-enabled> <threadsafe>true</threadsafe> 

web.xml:

  <servlet> <servlet-name>_ah_warmup</servlet-name> <servlet-class>com.google.apphosting.utils.servlet.WarmupServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>_ah_warmup</servlet-name> <url-pattern>/_ah/warmup</url-pattern> </servlet-mapping> 

also my main dispatcher spring manager and appstats servlet:

  <load-on-startup>1</load-on-startup> 
+4
source share
1 answer

I thought for myself. Google's best search engine showed the correct doc page:

https://developers.google.com/appengine/docs/adminconsole/performancesettings

Reserved instances are created when specifying idle instances. So I changed the Idle Instances setting from auto / auto to 2 / auto. What is it!

Performance is now large and stable, so I recommend that anyone who has paid applications, specify at least one unoccupied instance.

I also see that warm-up requests now appear for new dynamic instances, so reserved instances are indeed a warm-up requirement.

+2
source

Source: https://habr.com/ru/post/1415884/


All Articles