🎛Microservices
Introduction to Microservices
Last updated
Was this helpful?
Introduction to Microservices
Last updated
Was this helpful?
Before learn about Microservice let's take a look about monolithic architecture. Monolithic is considered to be a traditional way of building applications. The monolithic approach is a default model for creating a software application. When developing a server-side application with a modular hexagonal or layered architecture which consists of different types of components. Its trend is going down because building a monolithic application poses a number of challenges associated with handling a huge code base, adopting a new technology, scaling, deployment, implementing new changes and others.
Simple to develop
Simple to deploy
Simple to debug and test
Simple to scale horizontally
The size of the application can slow down the start-up time.
Application is too large and complex to fully understand and made changes fast and correctly.
The size of the application can slow down the start-up time.
Continuous deployment is difficult
Redeploy the entire application on each update.
Another problem with monolithic applications is reliability.
Monolithic applications has a barrier to adopting new technologies.
A microservice essentially is when you take instead of having a big monolith application that just does everything and split it up into a handful of other processes. We pick discrete business logic functions say maybe authentication of logging or user management a very specific thing and put it into its own application. Those different micro services can communicate via well-defined APIs usually HTTP. Microservices approach offers tangible benefits including an increase in scalability, flexibility, agility, and other significant advantages. Netflix, Google, Amazon, and other tech leaders have successfully switched from monolithic architecture to microservices.
Key Points:
Separate business logic functions
Instead of one big program, several smaller applications
Communicate via well defined APIs usually HTTP
Language independent
Fault isolation
Scalable
It enables each service to be developed independently by a team that is focused on that service
Fast iterations
Pair well with containers
Microservice architecture enables each service to be scaled independently
Microservices architecture adding a complexity to the project just by the fact that a microservices application is a distributed system.
Deploying a microservices-based application is also more complex
Building complex applications is inherently difficult. A Monolithic architecture only makes sense for simple, lightweight applications. You will end up in a world of pain if you use it for complex applications. The Microservices architecture pattern is the better choice for complex, evolving applications despite the drawbacks and implementation challenges.