Microservices — Myths and Misunderstandings
Microservices are quite popular. Learn more about microservices, what's myth and misunderstood, and what's fact.
Join the DZone community and get the full member experience.Join For Free
Microservices Aren't Micro Enough !
While the definition of microservices is clear, interpretation of it is very different within the development community.
Some questions are,
- Is it single entity representation?
- Is it single service representation?
- Is it a logical functional group?
Let’s take an example of a banking application for the sake of this discussion,
Microservices Are Scalable!
Microservices are a style of architecture which allows you to scale, great, how and why? Traditional 3–tier architecture can also be scaled and proven to be scalable, so what’s so special about microservices?
Ex: In online travel booking, ratio of shopping to booking request is 100:1.
- What does this mean; you get 1 booking if you are able to gracefully handle 100 shopping request.
- Does that ring a bell! Booking would need less resources than shopping, why scale the entire system when the expectation is 100:1 ratio?
Microservices Help Maintainability and Uptime!
“Rolling restart,” “Hot Deployment,” “round robin deployment,” sound familiar? Maintenance of applications with very minimal down time is a stated priority in modern applications.
Microservices Need Discovery?
Well anything that auto scale (up and down) needs to be discovered.
Traditional load balancers are great with static environment, worst case adding a node and running a script to include the new instance. If microservices are going to be scaled up and down they needs to discovered, registered and added to the load balanced.
Well, most of the software problems are solved by introducing a layer of indirection. Each microservice needs to self-register when it’s up or down. Need for a registry keeper, a load balancer that’s sensitive to load. Checkout how, Netflix solved this problem with Eureka on AWS.
Microservices Support Polyglot Programming?
Microservices by definition is a contract driven service implementation with HTTP/REST as the back bone (xml/json data transfer). These well-defined boundary between microservices on a lightweight protocol helps to build a diverse team of programmers, the focus is functionality not the choice programming language.
Microservices and Containers are marriage made in heaven?
The heaviness of the virtual machine and the nature of modern applications to quickly spin-off and tear-down microservices, makes the containers an ideal match.
It’s true DevOps, you package not just microservies the container and the execution environment as a whole. Downside, application teams will become the infrastructure team and need to have a good understanding of containerization.
Microservices Add Additional Complexity?
Everything comes with a cost so do microservices, not every application are build same or needs same availability, scalability and maintainability requirements.
Opinions expressed by DZone contributors are their own.