views:

57

answers:

3

For instance, if I have robots.txt declared as a static resource, and assuming that the application is stopped, does accessing it cause my application to be started ?

+1  A: 

I can't speak authoritatively, but my guess is that it won't, for a few reasons.

http://code.google.com/appengine/docs/python/runtime.html#App_Caching

The concept of app persistence seems to be limited to caching imports referenced by a script, or if the script defines a main() function, caching the script itself.

If your app.yaml includes one or more script handlers and one or more static handlers, it wouldn't make sense for a request to a static file to "spin up" any or all of your script handlers.

Further, app caching is apparently be specific to individual web servers. Since static and dynamic files are handled by different webservers, I wouldn't expect a request for a static file to even be noticed by the dynamic content servers.

Drew Sears
+1  A: 

Have a look here. Judging by that I would say that if a file is marked as a static file in your appengine-web.xml file, it will be served without restarting your application. But if you have the file marked as a resource file, it will be considered part of your application and therefore it would restart the app when serving that file.

So just make sure your static files are under the static_files element and then you should be fine.

tomlog
+4  A: 

No.

Nick Johnson
To elaborate: Requests for static files are served by a separate infrastructure to other requests. They never reach the app server. This is also why static content is not accessible by a deployed app.
Nick Johnson
@Adam: surely the requests and bandwidth are still counted towards your quotas?
tomlog
@Adam that clearly cannot be the case. If it were, I could use app engine to serve billions of terabytes for free, as long as they were terabytes of static files.
Peter Recore
@tomlog: the quota documentation does say that static files count towards outgoing bandwidth quota, but it is unclear on the subject of requests. http://code.google.com/appengine/docs/quotas.html
Adam Crossland
Thanks. Although I did have to look at your profile to understand why you are so sure.
Robert Munteanu