Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can achieve these goals using App Engine backends (long-running, configurable, addressable, persistent servers):</p> <ul> <li><a href="https://developers.google.com/appengine/docs/python/backends/" rel="noreferrer">https://developers.google.com/appengine/docs/python/backends/</a></li> <li><a href="https://developers.google.com/appengine/docs/java/backends/" rel="noreferrer">https://developers.google.com/appengine/docs/java/backends/</a></li> </ul> <h3>Python implementation</h3> <ol> <li><p>Configure a backend to be both <em>public</em> and <em>dynamic</em></p> <pre><code># backends.yaml backends: - name: foo instances: 20 options: public, dynamic </code></pre></li> <li><p>In addition to deploying your app in usual way:</p> <pre><code>appcfg.py update . </code></pre> <p>remember to deploy you backend:</p> <pre><code>appcfg.py backends . update </code></pre></li> <li><p>For the initial connection, have your client use the non-instance specific backend hostname, e.g.:</p> <pre><code>foo.your_app_id.appspot.com </code></pre> <p>App Engine will route your request to available backend instance, after optionally starting a new backend instance.</p></li> <li><p>In the request handling code on the server, use the backends API to determine which instance is handling the request and return to the client a instance specific URL.</p> <pre><code>from google.appengine.api import backends import webapp2 class GetPersistentUrlHandler(webapp2.RequestHandler): def get(self): """Return the current backend's instance-specific URL.""" my_url = backends.get_url(instance=backends.get_instance()) self.response.write(my_url) app = webapp2.WSGIApplication([ ('/get_peristent_url', GetPersistentUrlHandler), ], debug=True) </code></pre></li> <li><p>Client makes subsequent connections to the instance specific backend URL:</p> <pre><code>http://3.foo.your_app_id.appspot.com </code></pre> <p><em>Note: when using https be sure to replace subdomain dots with <code>-dot-</code> in order to avoid SSL certificate issues.</em></p> <pre><code>https://3-dot-foo.your_app_id.appspot.com </code></pre></li> </ol> <h3>Limitations</h3> <ol> <li>Backends do not live forever and may be shutdown unexpectedly and without notice</li> <li>The number of backends your application can have is currently limited</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload