This page provides an overview of push queues. Push queues run tasks by delivering HTTP requests to App Engine worker modules. The requests are delivered at a constant rate. If a task fails, the service will retry the task, sending another request. You must write a handler for every kind of task you use. A single module can have multiple handlers for different kinds of tasks, or you can use different modules for different task types.
The task deadline
When a worker module receives a push task request, it must handle the request and send an HTTP response before a deadline that depends on the scaling type of the worker module.
Automatic scaling modules must finish before 10 minutes have elapsed. Manual and basic scaling modules can run up to 24 hours.
A response value between 200–299 indicates success, all other values indicate the task failed. If the task fails to respond within the deadline, or returns an invalid response value, the task will be retried.
Retrying a failed task
If a push task request handler returns an HTTP status code outside the range 200–299, or fails to return any response before the task deadline occurs, App Engine retries the task until it succeeds. The system backs off gradually to avoid flooding your application with too many requests, but schedules retry attempts for failed tasks to recur at a maximum of once per hour.
Working with push queues
When working with push queues, at a minimum, you'll need to do the following things:
- Create tasks programmatically and add them to the default push queue, or to one or more named push queues.
- Write a handler that processes a task's request, and assign the handler to an App Engine module.
Optionally, you can also:
- Create and customize multiple queues to perform multiple tasks efficiently.
- Monitor and manage your push queues in the Google Cloud Platform Console.
When you use push queues, your application is subject to additional quotas.