ASP.NET Microservices Best Practices

As you can see, there are a lot of new improvements and enhancements to ASP.NET for developers and architects to consider. In addition to framework- and feature-level improvements, we also wanted to add some generally accepted recommendations or considerations when designing microservices using ASP.NET Web API.

Use Async Everywhere

Ensure that your web APIs use the Async/Await pattern where possible. When executing a request synchronously, for example an I/O request to read a file, the thread will idle and block execution until the I/O request is complete. Using the Async/Await pattern enables your thread to return to the thread pool so it can handle future requests. For API developers, ensure that both your ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.