Microservices

The most prominent aspect of designing applications to run on App Engine is the use of a microservice architecture. Microservices are a well-established pattern, and the scope of designing and developing microservices goes well beyond the scope of this book. While strictly speaking, building solutions on App Engine does not require the use of microservices, this design decision offers a number of benefits—both for App Engine and for web services in general.

By breaking functionality into a number of microservices, developers can build, test, and release components as individual App Engine services. By separating these releases into versions, teams can quickly roll back a specific component of the overall application without affecting other services. App Engine supports multiple languages and runtime environments, meaning each microservice can be written in the language that best suits the service's needs.

With App Engine's support for the routing and splitting of network traffic, teams can easily conduct complex release strategies and A/B testing on specific services within the application, since each version of a service is provided with a dedicated URL in the form of <VERSION>-dot-<SERVICE>-dot-<PROJECT>.appspot.com. This means services can be hard-coded to use a specific version of downstream services, upgrading as needed.

Perhaps the most beneficial aspect of microservices on App Engine is that each service can be independently scaled. A front-end service that receives very high traffic can scale as needed, while a relatively low-use backend service can maintain a lower number of instances. This improves overall resource utilization of the system, and allows developers to approach each service independently in terms of scalability.