Microservices is an application development and deployment approach perfectly suited to the agility, scale, and reliability requirements of modern cloud applications. In a microservices model, developers individually build and deploy small, independently executed services or “microservices,” that collaborate using published API calls across the network to deliver the overall application’s functionality. This results in a fine-grained, loosely coupled application that can easily be distributed across multiple host machines for scale and reliability.
Most enterprises start by designing their infrastructures as a single monolith or several tightly interdependent monolithic applications. The monolith carries out several functions. All the programming for those functions resides in a cohesive piece of application code. Since the code for these functions is woven together, it is difficult to untangle. Changing or adding a single feature in a monolith can disrupt the code for the entire application. This makes upgrades a time-consuming and expensive process. The more upgrades performed, the more complicated the programming becomes until upgrades and scaling are virtually impossible. Solving these challenges is the core advantage of a microservices architecture.
The term “microservice” emphasizes the fact that applications should be composed of services small enough to truly implement a single role. An example could be a function to calculate sales tax on a retail website. Each microservice has well-defined API contracts for other microservices to communicate and share data with it. Microservices must also be able to version and update independently of each other. This loose coupling is key to supporting rapid and reliable evolution of an application. What would have been a single tier of a monolithic application decomposes into many discrete microservices, each independent and isolated.
The common use cases for microservices:
- To break up monolithic applications
- Quickly added business intelligence, forecasting, machine learning analytics, or other services
- Enable the development, distribution, and repurpose of SaaS applications.
- Rapidly deploy proof of concepts
- Creation of an IOT network