Implementing Microservices on AWS - Implementing Microservices on AWS

Implementing Microservices on AWS

Publication date: November 9, 2021 (Document history and contributors)

Abstract

Microservices are an architectural and organizational approach to software development created to speed up deployment cycles, foster innovation and ownership, improve maintainability and scalability of software applications, and scale organizations delivering software and services by using an agile approach that helps teams work independently. With a microservices approach, software is composed of small services that communicate over well-defined application programming interfaces (APIs) that can be deployed independently. These services are owned by small autonomous teams. This agile approach is key to successfully scale your organization.

Three common patterns have been observed when AWS customers build microservices: API driven, event driven, and data streaming. This whitepaper introduces all three approaches and summarizes the common characteristics of microservices, discusses the main challenges of building microservices, and describes how product teams can use Amazon Web Services (AWS) to overcome these challenges.

Due to the rather involved nature of various topics discussed in this whitepaper, including data store, asynchronous communication, and service discovery, it is recommended that you consider specific requirements and use cases of their applications, in addition to the provided guidance, prior to making architectural choices.

Introduction

Microservices architectures are not a completely new approach to software engineering, but rather a combination of various successful and proven concepts such as:

  • Agile software development

  • Service-oriented architectures

  • API-first design

  • Continuous integration/continuous delivery (CI/CD)

In many cases, design patterns of the Twelve-Factor App are used for microservices.

This whitepaper first describes different aspects of a highly scalable, fault-tolerant microservices architecture (user interface, microservices implementation, and data store) and how to build it on AWS using container technologies. It then recommends the AWS services for implementing a typical serverless microservices architecture to reduce operational complexity.

Serverless is defined as an operational model by the following tenets:

  • No infrastructure to provision or manage

  • Automatically scaling by unit of consumption

  • Pay for value billing model

  • Built-in availability and fault tolerance

Finally, this whitepaper covers the overall system and discusses the cross-service aspects of a microservices architecture, such as distributed monitoring and auditing, data consistency, and asynchronous communication.

This whitepaper only focuses on workloads running in the AWS Cloud. It doesn’t cover hybrid scenarios or migration strategies. For more information about migration, refer to the Container Migration Methodology whitepaper).