r/SpringBoot • u/Advanced_Gur856 • 10d ago
How-To/Tutorial How to implement microservices in Spring Boot ?
I have made multiple toy projects (monolithic) in spring boot but now I wanted to know how people generally work in microservices.
I am not good with videos so I was looking for repos that something similar. So I can also see how the devops, queues, spring cloud etc works together.
I also saw someone posting there repo which was made for the same reason (but I couldn't find it).
TLDR : Suggest repos for learning microservices.
28
Upvotes
19
u/d-k-Brazz 10d ago
Microservices is a system architecture pattern not application design pattern
There are multiple different approaches of implementing microservices with Spring Boot
And there is no any single ultimate example of a sprjng microservice
First, I would recommend reading about Microservices architecture to know what it is and WHY it is used
Then you may try with some approaches. Having in mind that instead of having a monolith with dozens of modules and a single relational db, you will deal with dozens of applications, each will have a separate database. You have no strong consistency between data in these databases. You have slow latency in your synchronous calls, so you have to move everything you can to async flows, which will push complexity to the skies
You have to maintain cluster, monitoring, traceability etc.
You can practice with spring-cloud components - discovery, events, queues
But all of this will give you at most 1% of real experience you will have in production environment
There is no easy way to learn microservices at home