The Serverless Microservices reference architecture

The Serverless Microservices reference architecture

This architecture has been upgraded to Azure Functions v3

What are microservices?

Microservices are independent modules that are small enough to take care of a single action, and can be independently built, verified, deployed, and monitored. Applications that are based on microservices combine these independent modules into a highly decoupled collection, providing the following additional benefits over traditional "monolithic" applications:

  • Autonomous scalability: The independent microservices modules and their related services can be individually and automatically scaled based on their respective demands without impacting the application's overall performance. The ability to independently scale removes the need to scale the entire app up or down, potentially saving costs and reducing downtime.
  • Isolated points of failure: Each of the services can be managed independently, isolating potential problem areas to individual services, and replacing or retiring services when deprecated or unused without affecting the overall structure and functionality.
  • Pick what's best: Microservices solutions let development teams use the best deployment approach, language, platform and programming model for each service, providing flexibility in choosing technologies and tools.
  • Faster value delivery: Microservices increase agility putting new features in production and adding business value to solutions, as the deployment of small and independent modules requires much less time and several teams can be working on different services at the same time, reducing development time and simplifying deployment.

What is serverless?

The term "serverless" can be confusing to the uninitiated. It can be read as "no servers", in the way that "hopeless" means "no hope", or "cloudless sky" means "no clouds". In the case of serverless architecture, it simply means you focus "less on servers", and more on the functionality and features of your solution. This is because serverless abstracts away servers so you do not need to worry about server configuration, scaling of underlying resources is usually automatically handled for you based on load, number of messages, and other heuristics, and your deployments are done at the service and application-level rather than at the infrastructure-level. The end result is increased productivity, ease of development, simplified interoperability with other services through event-driven triggers and preconfigured service hooks, and increased choice of languages and tooling for the solution as a whole through mixing and matching various serverless components.

The combination of these architectures, deemed "serverless microservices", is ideal for helping us reach our goals :

  • Rapid development by the teams of developers who can focus on specific components of the solution without the usual dependency-riddled challenges of developing monolithic applications
  • Global distribution of the architecture, with automatic scaling of individual components based on demand
  • Consumption-based billing that saves money during off-peak hours
  • The ability to deploy updates to portions of the solution without affecting the application as a whole

This Serverless Microservices architecture uses fully managed services from the Azure Serverless platform to build the main building blocks of microservices solutions such as:

No alt text provided for this image


  1. API Gateway:?Using API Management to expose the endpoints of the backend services, so the client application can consume them securely. This also helps with decoupling the client side from the backend, since you can easily?manage changes on where the services are actually hosted?from the gateway without affecting the client application.
  2. Entry points:?The public facing APIs that the client application will be using, powered by Azure Functions responding to HTTP requests.
  3. Workflow orchestrator:?Middle-tier service to interconnect the public facing APIs with the actual backend services that are tied to the data stores and other critical components, orchestrating the work of these services based on actions on the client side.
  4. Async queue:?Messaging service to handle services intercommunication and pass along information and data between the different services, represented by Azure Event Grid. By using an event-driven approach, we’re also favoring services decoupling, since the information exchange will have a fire-and-forget approach, with services pushing events and handlers subscribed to those events and handlers subscribing to those events for processing.
  5. Backend services:?The services that are directly operating with the data layer and other components of the solution, isolated from the rest and easily replaceable if needed (e.g. changing the type of database used to store data) without affecting the rest of the application and interactions.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了