From the course: Microservices: Design Patterns

Microservices and cloud native

- Let me start by saying one thing very clearly, microservices do not make a system cloud native. And cloud native doesn't require microservices. All too often, these topics get merged, and I want to be very clear from the beginning about this. Now, from my perspective, and from the perspective of this course, we're going to focus more on how to utilize microservices in a cloud native pattern for building our system. "Why?" you may ask. Because cloud native can literally run anywhere, not just the cloud. So let's talk a little bit about what cloud native means. First of all, cloud native is an architectural style. What that means is that it isn't a pattern per se, of how to solve a problem. Instead, it's a way of doing processes and building systems to facilitate an end goal. Cloud native is designed primarily to facilitate operating in the cloud. It includes things like externalizing configuration, focusing on scalability, making your application startup fast and handle immediate shutdowns gracefully. There's a whole plethora of ways to represent cloud native applications. I have a course here in the library called "Twelve-Factor and Fifteen-Factor Cloud Native Application Development" that I encourage you to look at when wanting to learn more about cloud native. Cloud native applications are designed to be portable and scalable. Portability comes into play when you can deploy or move your applications anywhere globally, and they still work without additional code. Scalability entails building your applications to run as a single unit or multiple units depending on your overall needs of your system. Advanced designs like using autoscaling to allow your services to scale up or down based on the overall system load, increase the need for this scalability. It is very important to note that there is nothing that prevents you from building cloud native applications and running them in your corporate single instance data center. So now let's talk about microservices since that's why you're here. I want to start by saying that this is very open to personal interpretation. There is no clear definition of what makes a microservice micro. I have seen nano services that go overboard, and I've seen smaller monoliths that don't go far enough. For now, we will just talk about microservices being smaller, scoped units of work. Monoliths usually expose many applications and services in a single artifact. Scaling these systems was a massive undertaking. Microservices are all about breaking those endpoints up into distinct units of work so we can scale them independently. We often hear these concepts talked about at the same time. Both cloud native development practices and microservices architectures put an emphasis on building scalability into your application and system as a whole. Now, often when building cloud native systems, microservices appear to be the clear path to get there, and this can muddy the water some when talking about these two topics. It is important to note that you can do cloud native development without building microservices, and likewise, you can build microservices, not targeting cloud native deployments. It is important to make sure that this is clear. All too often I hear people talking about one topic and implying the other. Even though they're so distinct, they work so well together to solve the common problem. So please just take into account that even though some may consider them requirements of each other, that is not the truth in any way, shape, or form.

Contents