Challenges with Microservices
The microservices provides a nice and easy way to separate out individual concerns/capabilities for building a solution. These can be developed independently using whatever technology the squads feel is right for delivering that function. But when you start building a complex solution in this model, there are few disadvantages or issues to deal with.
I’m trying to list few from my experience below.
Cultural and Organizational change
The foremost is to get the teams organized around microservices. Though each squad meets and communicates well within the team, it is important to ensure effective communication across the squads or teams.
Duplication of Efforts
Many a times if there is no good communication across teams, I’ve seen that there is reinventing of wheel or teams trying to solve the same problem. Soon we might have two or more options of the same functionality that’s used by different squads
Distributed Systems are inherently Complex
As with traditional distributed systems, the difficulty is with how to manage distributed systems as well as make sure the end to end value of the solution is delivered – for the same you need to make sure individually each services are scalable, available and performs at their best. We have to deal with N/W Latency, Fault Tolerance, Serialization overhead and of course fan out of Requests leads to increased n/w traffic.
Service Discovery, Visualization
The most important issue with this model is when you are building a complex solution, soon are sitting on a pile of microservices and the complexities associated with handling their integration. Service discovery, visualization becomes an important element to be included in such scenario.
Any cloud or SaaS service is economical to both the consumer and provider, only if you can operate it optimally. Microservices involves a lot of infrastructure/tooling and significant operational overhead. Each team the again does their own Dev-Ops automation, tools etc. So there has to be some governance across teams to bring in this efficiency with tools and operations. Essentially ensure repeatability and reliable automation - Everything must be defined in code, testable and repeatable.
With many microservices, the attack surface increases and it is important to consider Security also holistically than at a microservice level. How to ensure authenticated users are only provided access to protected resource and the identity context is neatly propogated across microservices is one key consideration. Secure engineering should take care of fixing loopholes for any man in the middle attacks. Collecting the logs from all microservices in one place is a pre-req to do security intelligence.
Debugging & Testing
How to ensure the entire set of microservices work to fulfil the end to end scenario requires all the services and the right versions are picked up and supports backward and forward compatibility. Service versioning is another important consideration here.
Overall I think technical challenges can be overcome easily. The important and difficult thing is to keep the communication across these teams in tact. The recommendation is to have a repeating scrum of scrums to take all the squads together forward.
· Check out crafting the cloud videos on challenges with microservices - by Kyle and Roland on their interesting insights on the topic. https://www.ibm.com/blogs/bluemix/2016/10/challenges-with-microservices-part1/