Loading video player...
Imagine 10 goroutines trying to fetch the same data from backend for same key. It will be a wastage of work if all of them do the same work. Ideally we should have one goroutine do the work and share results across others. This is what singleflight allows us to do. If you want in-depth tutorial on Docker & Kubernetes along with gRPC, fully explained from end-to-end, then check out this course on Microservices: https://www.justforlearning.com/courses/build-your-first-microservices-based-app-using-go-grpc-kubernetes-docker This is not free but if you are a student or can't afford it then feel free to email to justforlearnings@gmail.com explaining why and I will be able to give it for free. But in condition that you will be finishing the course completely within a month. :)