Book Image

Microservices Design Patterns in .NET

By : Trevoir Williams
Book Image

Microservices Design Patterns in .NET

By: Trevoir Williams

Overview of this book

Are you a developer who needs to fully understand the different patterns and benefits that they bring to designing microservices? If yes, then this book is for you. Microservices Design Patterns in .NET will help you appreciate the various microservice design concerns and strategies that can be used to navigate them. Making a microservice-based app is no easy feat and there are many concerns that need to be addressed. As you progress through the chapters of this guide, you’ll dive headfirst into the problems that come packed with this architectural approach, and then explore the design patterns that address these problems. You’ll also learn how to be deliberate and intentional in your architectural design to overcome major considerations in building microservices. By the end of this book, you’ll be able to apply critical thinking and clean coding principles when creating a microservices application using .NET Core.
Table of Contents (21 chapters)
1
Part 1: Understanding Microservices and Design Patterns
8
Part 2: Database and Storage Design Patterns
11
Part 3: Resiliency, Security, and Infrastructure Patterns

Building Resilient Microservices

Coming off the heels of the Saga pattern, we can appreciate the value of having fail-safes built into our microservices application. We need to ensure that we adequately handle inevitable failures.

We can’t assume that our distributed microservices will always be up and running. We also can’t assume that our supporting infrastructure will be reliable. These considerations lead us down a path where we must anticipate the occurrence of failures, whether prolonged or transient.

A prolonged outage can be due to a downed server or service, some generally important part of the infrastructure. These tend to be easier to detect and mitigate since they have a more obvious impact on the runtime of the application. Transient failures are far more difficult to detect since they can last a few seconds to a few minutes at a time and aren’t usually tied to any obvious issue in the infrastructure. Something as simple as a service taking 5...