Batch work and task queues

Another consideration when architecting solutions on App Engine is that the platform generally expects services to fulfill requests very quickly, with relatively low resources. In doing so, a single service can handle a very large number of requests, which reduces operational costs significantly. For long-running or resource-intensive jobs, App Engine provides task queues. Task queues allow requests to be handed off to separate services that can process them in an asynchronous manner.

App Engine provides channels for coordinating this work between services in the form of the Task Queue API. As with general microservice architecture, task queues allow worker services to be scaled independently of the calling service. The downside of using task queues is that they require services to be designed and built specifically for use with the Task Queue API, which represents significant vendor lock-in.

Services that are built for handling web requests are somewhat limited in their use of background threads, and App Engine imposes response timeouts based on the environment and form of scaling used. Generally speaking, performing long-running processes as part of a standard request/response model is a poor design decision. With task queues, developers have an easy-to-use, managed solution for these types of processes.