From the course: DevOps Foundations: Microservices

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Asynchronous calling patterns

Asynchronous calling patterns

Asynchronous patterns tend to be better suited to microservices. However, they can be more complex to implement and support. Let's dive into asynchronous patterns and talk about when to use them and how to manage their complexities. Asynchronous calls use threading or non-blocking IO to initiate a call, then immediately return control back to the calling function. Most inter-service calling between two microservices should be asynchronous to allow flexibility in scaling and performance. There are two major methods for asynchronous communication between services: concurrency and messaging. Each of these approaches have their benefits and challenges. Let's take a closer look at both methods. Concurrency is a software engineering term that is used to refer to parallel processing. Most modern languages offer some kind of concurrency. Go goroutines, JavaScript promises, and async await keywords in C-sharp and Java. All of these conventions represent a similar approach to concurrency. A…

Contents