Menu
Microservices on AWS
AWS Whitepaper

Challenges of Microservices

Despite all the advantages that we have discussed, you should be aware that—as with all architectural styles—a microservices approach is not without its challenges. This section discusses some of the problems and trade-offs of the microservices approach.

  • Distributed Systems – Microservices are effectively a distributed system, which presents a set of problems often referred to as the Fallacies of Distributed Computing – Programmers new to distributed systems often assume the network to be reliable, the latency zero, and the bandwidth to be infinite.

  • Migration – The migration process from a monolithic architecture to a microservices architecture requires you to determine the right boundaries for microservices. This process is complex and requires you to disentangle code dependencies going down to the database layer.

  • Versions – Versioning for microservices can be challenging. There are several best practices and patterns, for example, routing-based versioning, which can be applied at the API level.

  • Organization – Microservices architecture and organization architecture go hand in hand. Organizational problems include how to: build an effective team structure, transform the organization to follow a DevOps approach, and streamline communication between development and operations.

In this whitepaper, we mainly focus on the architectural and operational challenges of a move to microservices. To learn more about DevOps and AWS, see https://aws.amazon.com/devops/.

Architectural Complexity

In monolithic architectures, the complexity and the number of dependencies reside inside the code base, while in microservices architectures complexity moves to the interactions of the individual services that implement a specific domain, as shown in the following figure.

Architectural challenges like dealing with asynchronous communication, cascading failures, data consistency problems, discovery, and authentication of services are critical to successful microservices implementation, and we’ll address them in this paper.

Operational Complexity

With a microservices approach, you no longer run a single service, but dozens or even hundreds of services. This raises several questions:

  • How to provision resources in a scalable and cost-efficient way?

  • How to operate dozens or hundreds of microservice components effectively without multiplying efforts?

  • How to avoid reinventing the wheel across different teams and duplicating tools and processes?

  • How to keep track of hundreds of pipelines of code deployments and their interdependencies?

  • How to monitor overall system health and identify potential hotspots early on?

  • How to track and debug interactions across the whole system?

  • How to analyze high amounts of log data in a distributed application that quickly grows and scales beyond anticipated demand?

  • How to deal with a lack of standards and heterogeneous environments that include different technologies and people with differing skill sets?

  • How to value diversity without locking into a multiplicity of different technologies that need to be maintained and upgraded over time?

  • How to deal with versioning?

  • How to ensure that services are still in use especially if the usage pattern isn’t consistent?

  • How to ensure the proper level of decoupling and communication between services?