This page provides an overview of push queues. Push queues run tasks by dispatching HTTP requests to App Engine worker services. The requests are delivered at a constant rate. If a task fails, the service retries the task, sending another request. You must provide a handler for every kind of task you use. A single service can have multiple handlers for different kinds of tasks, or you can use different services to manage different task types.
The task deadline
When a worker service 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 service.
Automatic scaling services must finish before 10 minutes have elapsed. Manual and basic scaling services can run up to 24 hours.
An HTTP response code 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 is 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, the queue 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 minimum 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 that you have created.
- Write a handler that processes a task's request, and assign the handler to an App Engine service.
Optionally, you can also:
- Create and customize multiple queues to perform multiple tasks efficiently.
- Monitor and manage your push queues in the Google Cloud console.
When you use push queues, your application is subject to additional quotas.
- Learn how to create push queues
- Learn how to create tasks
- Learn about writing handlers
- Look at an example