Enterprise API

Building reliable web apps

The next iteration of our enterprise-grade workshop.

Anyone who has been reading my blog during the past two years has seen my series on building enterprise grade APIs. This started as a workshop I gave at conferences and user groups, following the shift at Microsoft from ASP.NET Core Web API to Minimal API. While Minimal API certainly has its use cases, it lacked a lot of features that I consider essential for enterprise-grade APIs.

One could create a new project template (and I did for internal projects). But next to building the actual API and add enterprise-grade features, you also need to take hosting into account. And often, this means building a resilient cloud architecture as well. As infrastructure is typically the last thing developers want to take care of, I was very happy to see that Microsoft recently released a new GitHub project called Reliable web app pattern for .NET. You can use this project as a starting point for your own projects, or as a reference to see how you can build a resilient cloud architecture.

The Azure architecture

As a picture says more than a thousand words, let’s start with the architecture diagram:

Reliable web app architecture on Azure

As you can see, this allows you to deploy an application with a regional failover, following the Well Architected Framework principles as well.

Well Architected Principles in reliable web app

What does it pack?

  • PowerShell scripts and Bicep templates to deploy the architecture.
  • Azure DevOps and GitHub pipelines
  • A sample .NET Web API application with most of the practices we touched in our workshop/blog series.
Reliable web app pattern principles How to implement the principles
Reliable web app pattern principles:
▪ Minimal code changes
▪ Reliability design patterns
▪ Managed services

Well Architected Framework principles:
▪ Cost optimized
▪ Observable
▪ Ingress secure
▪ Infrastructure as code
▪ Identity-centric security
▪ Retry pattern
▪ Circuit-breaker pattern
▪ Cache-aside pattern
▪ Rightsized resources
▪ Managed identities
▪ Private endpoints
▪ Secrets management
▪ Bicep deployment
▪ Telemetry, logging, monitoring

What if I have an existing application?

Nobody says you need to copy over the whole repository and start from there. You can also cherry-pick the parts you need. For example, you can use the Bicep templates to deploy your existing application to Azure. This without having to manually create all the resources in the portal or write Bicep files yourself.

Happy building!

Licensed under CC BY-NC-SA 4.0; code samples licensed under MIT.
comments powered by Disqus
Built with Hugo - Based on Theme Stack designed by Jimmy