The Backend API is deprecated as of March 13, 2014. Although Google will
continue to support the Backend API in accordance with our
terms of service
, it is strongly recommended that all new applications
use the
Modules API
instead.
For information on converting existing apps using the Backend API to the
Modules API, see
Converting Apps to
Modules
You can add backends to your application in a configuration file called
backends.yaml
, which declares the name and desired properties of each backend server.
- About backends.yaml
- Types of backends
- Request handling
- Defining handlers
- Instance classes
- Backends definitions
About backends.yaml
Backends have several unique and important differences from default App Engine instances; for more information about how backends work, please see the
Backends documentation
. The following code sample shows a sample
backends.yaml
file. This configuration file defines four separate backends:
-
A backend named
memdb
. This backend has five instances of the instance class B8. -
A backend named
crawler
uses the default class and options, but with ten instances. This backend definescrawler.py
as the start handler. -
A backend named
worker
using the default class with one instance, and configured with failfast to disable pending queue behavior. -
A backend named
cmdline
, used to execute long-running commands issued by admins of the application.
backends: - name: memdb class: B8 instances: 5 - name: crawler instances: 10 start: crawler.app - name: worker options: failfast - name: cmdline options: dynamic
Types of backends
App Engine supports two backend types: resident and dynamic. Resident backends are the default type of backend; they use resident instances, which remain in memory, even when idle, and are restarted automatically. This allows you to perform larger tasks or tasks requiring continuous processing. By default, a backend is configured with one instance, but you can add more in the configuration file.
The following table compares the major features of resident and dynamic backends:
Resident Backends | Dynamic Backends | Other Notes | |
---|---|---|---|
Instance type | Resident |