Start your MSA with Spring Boot — (1) Understanding of MSA

Minho Jang
ryanjang-devnotes
Published in
2 min readApr 17, 2021
image source: link

Microservice architecture(MSA) is one of the hottest topics among developers nowadays. The story of how the Medium engineering team had built the MSA has had over 14.9K claps (Jealous..!) and hundreds of articles have been written and searched in Medium to provide its fine concept and the step-by-step guide of building the architecture in many languages such as Node.js, Spring, and Go. Nevertheless, it still remains vague for beginners so I write this article to help them figure it out in plain English.

What is Microservice Architecture?

As James Lewis and Martin Fowler already mentioned in their article, there is no precise definition of this architecture style. So, not all microservice architectures have the same characteristics. Reading through the article, I think that there are two key elements consisting of the microservice architecture :

  • Componentization — MSA is an architecture that makes your service multiple components that could be redeployed independently. The aim of it is to minimize changes in the service interfaces and strengthen reusability.
  • Product-based decentralization — MSA is an architecture that decentralizes governance by splitting it into product units. It does not mean just to make cross-functional teams or to let developers in each service team make decisions. Rather, it is about the whole structure in which an organization communicates, works, and makes products. In other words, In MSA, one cross-functional team should be in charge of one service, choose the language they want to use for server-building, and manage its own data storage.

Pros and Cons

Pros

  1. Single-responsibility: each team can develop, maintain and deploy each service independently. It goes to a better scale in production level.
  2. Fast CI/CD: As microservices require fewer libraries than a monolithic service, it reduces the time to rebuild CI/CD pipeline.
  3. Failure tolerance: Being isolated from each other, microservices can tolerate failure better and it is easier to debug.

Cons

  1. Network complexity: As microservices heavily rely on messaging, managing the network stably requires additional costs such as DevOps tools, APM tools.
  2. Poor performance: Communicating back and forth to deliver data could take a longer time than in a monolithic service and show bad performance sometimes due to network latency and message processing.

References

[1] https://medium.engineering/microservice-architecture-at-medium-9c33805eb74f

[2] https://martinfowler.com/articles/microservices.html#ComponentizationViaServices

[3] https://raygun.com/blog/what-are-microservices/

--

--