I asked this question a few weeks ago. Today, I actually wrote and released a standard Django application, i.e. a fully functional relational DB-backed (and therefore a fully functional Django admin) included by Google CloudSQL . The only time I had to deviate from doing something in the standard Django way was to send an email (I had to do this using the GAE method). My setup is GAE 1.6.4
, Python2.7
, Django 1.3
, using the following in app.yaml
:
libraries: - name: django version: "1.3"
However, I need you to suggest clear steps to improve the response time of the original request when this Django application is cold . I have a simple webapp2
website that doesn’t get into the database, and when it’s cold, the response time is 1.56s
. Django alone, when it’s cold, gets into the database with two queries (two count(*)
queries on tables containing less than 300 rows), and the response time is 10.73s
! Not recommended for homepage;)
Things that come to mind are to remove middleware
classes that I don’t need, and other Django-specific optimizations. However, tips that will improve the situation also from the point of view of GAE will be really useful.
NB I do not want this to become a discussion about the benefits of switching to Django on GAE. I can mention that my personal experience with Django and, as a consequence, development productivity, significantly influenced the adoption of Django, and not other structures. Also, with CloudSQL, it's easy to get away from GAE (hopefully not!), Since Django code will work wherever there is little (or no) change. Related discussions on this topic can be found here and here .
source share