GAE Spring MVC: slow boot time

I recently deployed a Spring MVC application for the google engine engine, and the boot time is about 7 seconds. After downloading the application, the application is quite responsive. But if the application is idle for more than 1 minute (there is NO ANY traffic for it), the application must be restarted by GAE again, which also takes about 7 seconds. This is not acceptable for a PRD tier application. (The application is empty - I don’t even use JPA, Sitemesh, Spring Security, etc. It just loads the jsp page with some text.)

The only "best practice" for fixing the "boot time" I've seen so far is to set up a cron job that accesses the URL every minute, therefore keeping the application "loaded". Obviously, this is a terrible decision.

So, the question is: are there any “best practices” for Spring in GAE in terms of responsiveness? Since google and Spring are working to improve the integration between the two of them, was there any news / progress on this issue? I can not find anything specific, so I ask him here

Topic discussions: http://groups.google.com/group/google-appengine-java/browse_thread/thread/80d014fd5abd526f

UPDATE

There is a “ticket” for creating reserved instances, as well as a “heating” logic: http://code.google.com/p/googleappengine/issues/detail?id=2456

+7
java performance google-app-engine spring-mvc
source share
3 answers

GAE began to provide a paid service where you can always reserve a hot copy:

http://googleappengine.blogspot.com/2010/12/happy-holidays-from-app-engine-team-140.html

Always On - For high-priority applications with low or variable traffic, you can now reserve instances using the Always Connect Application feature. Always On is a premium feature worth $ 9 per month that backs up three instances of your application, never disabling them, even if the application has no traffic. This reduces the impact of download requests in applications with little or variable traffic.

Combined with warm-up requests, this is the best solution if you plan to use GAE.

+2
source share

Since the SDK 1.4.0 , you can avoid this delay by using warm-up requests .
Warmup requests load the application code into a new instance before any direct requests reach that instance.

+2
source share

Well, due to the lack of answers, I decided to go with the cron task (since at the moment I do not see another option)

Here is the cron.xml file that I am using

<?xml version="1.0" encoding="UTF-8"?> <cronentries> <cron> <url>/keepalive</url> <description>Keep the application alive</description> <schedule>every 1 minutes</schedule> </cron> </cronentries> 

And here is the controller:

 package com.xxxxxxxxxxxxx.web; import org.slf4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping("/keepalive") public class KeepAliveController { private Logger logger = org.slf4j.LoggerFactory.getLogger(KeepAliveController.class); @RequestMapping(method = RequestMethod.GET) public void keepAlive() { logger.info("I'm alive!"); } } 
0
source share

All Articles