Microservices: Hype vs. Substance
Microservices: Hype vs. Substance
Maybe the hype of microservices has you doubting their benefits. Read on to get the truth about the challenges and advantages of microservices.
Join the DZone community and get the full member experience.Join For Free
Learn why microservices are breaking traditional APM tools that were built for monoliths.
The purpose of microservices is to facilitate the process of building and maintaining applications. As opposed to the conventional style of building applications, utilization of microservices means that each element of the application can be developed separately. As a result, teams can work faster than they would if they had to manage one large project, and developers have more options when it comes to choosing programming languages and frameworks that would be the most appropriate for the individual components of the application.
One of the earliest implementers of microservices is a popular American entertainment company Netflix. With many enterprises following suit, it is worth discussing and examining the hype surrounding this technology and measuring it to its real substance, ie the real benefits it provides.
Agility vs Complexity
Since the process of building microservices based applications and their components is shorter than with monolith applications, there is more agility and probability of introducing new versions of a service in a shorter period of time. However, the process of deployment is more complex than with conventional monolith applications as different components may be implemented with the use of different tools.
Reliability vs Failure Response Strategy
Failure of a given microservice affects solely this individual service while the rest of the components might be able to operate normally. A failure in a conventional monolith application may affect the performance of all its functionalities. The problem is, however, that without close monitoring it might be difficult or even impossible to establish the source of failure with multiple microservices being implemented. That is why each microservice needs to have a separate monitoring configuration.
Testing: Easier or More Challenging?
As each microservice is built in isolation, theoretically testing should be made easier. However, due to the asynchronicity of microservices, creating and implementing manual and automated tests may turn out to be more challenging than in the case of monolith applications.
No Central Log Monitoring
Since each microservice generates a log and the log messages are distributed across multiple hosts, there needs to be a good logging strategy to manage issues that might appear anywhere in the application.
Management: Easier or More Complex?
As each team is responsible for the development of separate components, the work becomes divided between smaller teams and, simply put, gets done faster. However, it can be more challenging to manage a variety of different components of the infrastructure and new tools must be implemented to handle this complexity.
While monolith applications can only be scaled vertically, microservices based applications can be also scaled horizontally. If there is an increase in demand for one of the application components, scaling only this particular part of infrastructure is possible rather than impacting the whole application.
More Flexibility vs Higher Costs
While developers working with microservices can utilize a variety of languages, frameworks and modern technologies, this diversity results in overall higher costs of application maintenance.
More Independence vs Slower Performance
Each component of the microservice architecture can be changed or replaced without affecting the functioning of the other elements. On the other hand, each component consumes resources, and the burden on servers is greater than with monolithic applications. This increase of resource usage may cause the application to run slower and could require the use of additional servers. If the application takes too much time to respond, users will most likely exit it before it starts running.
Since the use of microservices allows for dividing a large project into smaller, easily manageable tasks, services can be changed and updated according to the specific needs of a given business.
Polyglot in Nature
As mentioned already, each module can have its own language, framework, database and other tools which suit a given component best. Each team is responsible for their part of the project which gives them more extensive knowledge in their particular component and better familiarity with the code of their choice.
The implementation of microservices has its range of advantages and challenges as well. How you approach the solutions provided by microservices may depend on your project’s specifications. If you value flexibility and independence, then utilizing microservices infrastructure can be the right choice for you. The solutions provided by microservices offer also more opportunities of adjusting the needs of a specific business client which might be a crucial benefit to you and your team. With the right strategy and a plan for testing, monitoring and management you can learn how to take advantage of the freedom microservices solutions have to offer.
Opinions expressed by DZone contributors are their own.