Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:11:12+00:00 2026-06-04T04:11:12+00:00

My application wishes to have: Automatic scalability I want App Engine to spin up

  • 0

My application wishes to have:

  1. Automatic scalability

    • I want App Engine to spin up new instances of my app when traffic increases
    • When instances become idle, I want App Engine to shut them down
  2. Client/server affinity

    • After an initial client->server HTTP request, I want clients
      to be able to connect to the same appserver, so that the appserver
      can maintain a bunch of client state
    • State may be updated frequently (in order to support real-time interactions),
      so memcache+datastore based persistence is not desirable.
    • The server may need to make decisions based on the state of multiple clients,
      e.g. real time multi-player game

How can I accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:11:13+00:00Added an answer on June 4, 2026 at 4:11 am

    You can achieve these goals using App Engine backends (long-running, configurable, addressable, persistent servers):

    • https://developers.google.com/appengine/docs/python/backends/
    • https://developers.google.com/appengine/docs/java/backends/

    Python implementation

    1. Configure a backend to be both public and dynamic

      # backends.yaml
      
      backends:
      - name: foo
        instances: 20
        options: public, dynamic
      
    2. In addition to deploying your app in usual way:

      appcfg.py update .
      

      remember to deploy you backend:

      appcfg.py backends . update
      
    3. For the initial connection, have your client use the
      non-instance specific backend hostname, e.g.:

      foo.your_app_id.appspot.com
      

      App Engine will route your request to available backend
      instance, after optionally starting a new backend instance.

    4. 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.

      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)
      
    5. Client makes subsequent connections to the instance specific
      backend URL:

      http://3.foo.your_app_id.appspot.com
      

      Note: when using https be sure to replace subdomain dots with -dot-
      in order to avoid SSL certificate issues.

      https://3-dot-foo.your_app_id.appspot.com
      

    Limitations

    1. Backends do not live forever and may be shutdown unexpectedly and without notice
    2. The number of backends your application can have is currently limited
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ruby-on-rails application that wishes to utilise the tumblr gem for adding
I have a WM 6.1 Prof. application that checks updates when user wishes to
Application is running in my local system app.config file <add key=dbconn value=Data Source=(local);database=VTech;User ID=sa;Password=sa;
An application I have recently started work on has to register two dll's, because
I have a web-application in spring where tasks should be assigned to workers (say
A client wants to have a simple intranet application to manage his process. He
My company is to develop a touchscreen application. We have some prior experience with
I have an existing ASP.NET web application that I'm converting to MVC 1.0. The
I want to develop network client and server with GnuTLS. I have several options:
I have a web application, written in PHP, where we have a couple of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.