Microservices
What are Microservices ?
Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well defined APIs.
Understanding Microservice Architecture
Microservice architecture is a distinctive method of developing software systems that tries to focus on building single-function modules with well-defined interfaces and operations.
The Six Characteristics Of Microservices
* Multiple Components
1. It can be broken down into multiple components services, So that each service can be deployed , tweaked , and redeployed independently without compromising the integrity of an application.
2. This way , you might need to change one distinct service instead of redeploying entire applications.
3. But this approach has its downsides, including expensive remote calls , coarser-grained remote APIs, and more complexity when redistributing responsibilities between components
* Built For Business
1. The microservices style is usually organized around business capabilities and priorities .
2. Unlike a traditional monolithic development approach – where different teams each have a specific focus on, say, UIs, databases, technology layers, or server-side logic – microservice architecture utilizes cross-functional teams.
3. Each team is responsible to make specific products based on individual services communicating via message bus. In microservices, a team owns the product for its lifetime.
* Simple Routing
1. Microservices act somewhat like the classical UNIX system: they receive requests, process them, and generate a response accordingly.
2. That’s where high-tech systems for message routing, choreography, and applying business rules are utilized.
3. You could say that microservices have smart endpoints that process information and apply logic, and “dumb pipes” through which the info flows.
* Decentralized
1. Since microservices involve a variety of technologies, old-school methods of centralized governance aren’t optimal.
2. The microservices community favors decentralized governance so its developers can produce tools that can be used by others to solve the same problems.
Recommended by LinkedIn
3. Monolithic systems use a single logical database across different applications. In a microservice application, each service usually manages its unique database.
* Failure Resistant
1. Like a well-rounded child, microservices are designed to cope with failure. Since several diverse services communicate, it’s quite possible that a service could fail.
2. In these instances, the client should allow its neighboring services to function while it gracefully bows out.
3. This requirement adds more complexity to microservices as compared to monolithic systems architecture.
* Evolutionary
1. It’s an evolutionary design and, again, is ideal for evolutionary systems where you can’t fully anticipate what future devices will access your application.
2. Many applications start based on monolithic architecture.
3. But as several unforeseen requirements surfaced, can be slowly revamped to microservices that interact over an older monolithic architecture through APIs.
Examples of Microservices
* Netflix has a widespread architecture that has evolved from monolithic to SOA. It receives more than one billion calls every day, from more than 800 different types of devices, to its streaming-video API. Each API call then prompts around five additional calls to the backend service.
* Amazon has also migrated to microservices. They get countless calls from a variety of applications – including applications that manage the web service API as well as the website itself – which would have been simply impossible for their old, two-tiered architecture to handle.
Microservice Pros and Cons
The Pros and Cons of Microservices :-
Pros
Cons
Cloud Engineer at Cloudside | Passionate About Cloud, Automation & CI/CD Pipelines | Linux | Shell scripting | Git & Github | Jenkins | Ansible | Terraform | Docker | Kubernetes | Aws | Azure | Python
2yGreat work Arpit Sharma