I am glad i didn't go for this architecture when rewriting one of my products. To me a dockerised server that can deploy anywhere and scale seems fitting enough for most cases. For netflix and them each service is so big it is technically a system on its own so this makes sense. But for my website of 1000 users this seems chaotic. And then deploying this must be expensive or resource intensive because each service needs its own resources. For me, my time, my value for money, my ability to ship and stay profitable at this time - the monolith approach is better. Nice video and a good watch, thank you.
It would be much appreciated if you could make a tutorial explaining how to deploy a Microservices-based Nestjs application to AWS or any other cloud provider with secure https connections to the API gateway. And thank you for creating these awesome videos!!
@@TechVisionExplainedmore Test Automation videos - am an aspiring QA automation tester it will be great honestly to learn from what you know as a senior Dev. I love the way you give detailed explaination thanks also for k6 the tool has been amazing for me
This is perfect and loved it. 🙂 I would love to have a detailed Video on NestJS Microservice with some real time implementation along with git repository
Your videos are amazing. You have the skill to explain things clearly because you know the stuff inside out. Keep it up! Could I request that you invest your time in creating videos on rate limiting, caching, API documentation (perhaps using Swagger?), and how to organize services and controllers as functionalities grow? Most tutorials only show basic CRUD operations, and it would be helpful if you could demonstrate how to effectively structure code with less clutter. Yes, I have seen your video on how to scale, but that's not what I'm referring to. I'm interested in seeing how to communicate with a real database using ORM and without ORM (I'm not a fan of ORMs, to be honest).
Thank you so much for the kind words 💜 Thank you so much for the feedback’ really useful to understand what are the pain points so that I can cover the most relevant topics. Funny enough I’m actually working on a video on swagger and another one one how to connect to a MongoDB database but in three different ways not just ORM 💪
@bartholomeas5231 First of all thank you for watching the video and subscribing to the channel really helps a lot, and I'm really grateful🙏 What's the exact error message you're getting in the console? By the way, I would love to share the source code, but I'm trying to focus on producing at least one NestJS video per week. It would just be impossible if I tried to provide source code for each video. If I do share source code, I would like it to be of the best standard possible, up to date, and have helpful comments and documentation. That's why, for the time being, there is no source code associated with my videos. I'm still trying to figure out a way around that, though so there could be some changes in the near future 🤞
@@TechVisionExplained I got stuck around 9minute of video, and the problem is that im not getting any meaningfull error message :/ Just 500 in postman and "ERROR [ExceptionsHandler] AggregateError" in the terminal. Its something with connecting to my 'users' microservice (as without that it works) but no idea why, im watching this video but i dont see any differences, just injecting USERS_CLIENT and trying to use 'users.findAll' on that (after importing clientsModule in my users.module in bookstore api) :/
Thanks for putting together this video, it is really helpful when trying to understand how each app communicates with each other. I have a couple questions that are not covered though: 1. Should microservices communicate with each other and if so how can we achieve that? 2. What about the deployment of an approach like this? Is each app deployed as a separate node application? 3. Is it worth adding a queue between the gateway and each microservice to improve their reliability? Thanks again for the high quality content!
Thanks for watching, and glad you found it useful 💜, Each of these questions is probably worth an entire video on its own, but I'm still going to try to answer them. But please take this with a pinch of salt. 1. NO! If your microservices communicate with each other, you end up with a communication graph. Which is hard to reason about. But if you want to do that, you can just create a client proxy inside a microservice app and send messages or events to other services. 2. YES! Each service should be deployable independently. That's kind of the whole point of microservices. Or at least they should run in a separate process. 3. NO! Start simple and basic; add more complex patterns later if you really need them. There are several communication styles (synch vs async), and each has pros and cons. I hope this was helpful and gave you some pointers 🙏, but again, there is a lot more nuance to this, and there are literally books and hour-long lectures on microservices communication 😅
@@TechVisionExplained Thank you so much for your reply and sharing your thoughts on this! I completely agree that a well-structured and organized codebase is crucial, especially as projects scale. As you mentioned, starting small and gradually adopting more complex approaches, like async communication with queues, is not only better for managing complexity but also more cost-efficient. I’m excited to see more of your content and would love to learn more about microservices communication, particularly with gRPC and asynchronous methods. Looking forward to your upcoming videos! :D
Hey, I wanted to generate the full books module using the CLI inside apps/books. That's why a renamed the root module from books.module to books-app.module. This way I could generate an entire books module with controller service and models. I could have done the exact some app/users. Just trying to make the videos as short as possible with the most value possible. I'm still learning how to get the right balance so thank you for your feedback this really helps 💜
Thank you for leaving some feedback, glad to hear this was helful 🤜 🤛 I would love to share the source code, but I'm trying to focus on producing at least one NestJS video per week. It would just be impossible if I tried to provide source code for each video. If I do share source code, I would like it to be of the best standard possible, up to date, and have helpful comments and documentation. That's why, for the time being, there is no source code associated with my videos. I'm still trying to figure out a way around that, though so there could be some changes in the near future 🤞
I am very happy to watch this video, it's awesome. I am looking for this type of video quite a while. Can you please add the git repo? So we can see the code.
Excellent Video, if you have any interesting in making an Advanced GraophQl Netjs Video would perfect with Schema First approach. Thank you and keep doing !
I dont understand the advantage over plain http app. I can scale an http app as well by creating a second one. How is this http to Microservice communication an improvement? Anyone has a use case to help me understand?
" I can scale an http app as well by creating a second one." But then you gotta give the Front-end team a number of API URLs equal to the number of your apps, though, it's the same project.
@@amerrrrrrr I use a load balancer in front then containers for my http apps. Trying to understand the advantages. The only thing I can think off is TCP is faster ...
i agree. i think the reason other architectures are still around is because they are valid. this is not the be all. i am in the same boat as you and doing this architecture for where i am at with my product would be crazy. there is no metric i can think of where micro services adds benefit to my product, if anything it's more hurdles, more expensive and more to manage. i will gladly slap my code on a -$7 VM/VPS and watch it perform just fine. With autoscaling. I have seen a trend now on people leaving serverless/lambdas because of the cold start delays and cost, moving back towards the more traditional approach. the hype train is a bumpy ride.
I just searched for NestJS microservice video now. And found it was uploaded 1 hour ago. There are alot of NestJS videos, but I think your production quality and explanation is way better. Keep creating NestJS videos... They are great
Great video just like always, but I have one doubt, as I have not worked on microservices pattern, I have one doubt here, microservices refer to the structure where we have different setup for our different usage on different servers, so that we can scale and maintain code easily, but here you have created all of them at one place, so how will this work? I can't understand that, can you please explain this to me? Thanks in advance.
First of all, thank you for watching, and I'm really glad you enjoyed it 🙏 In short, microservices refer to the fact that you can deploy each service independently. It doesn't matter if the code is in the same repo; the services can even be in different programming languages. The only thing that matters is that they can be deployed independently. In the case of the NestJS mono repo, you can build each application separately using `nest build . After that, you can deploy each application separately. Hope that makes sense
@@TechVisionExplained oh ok got it, I was thinking the same thing but was not sure if that is the case, thank you very much for your response, it was great talking to you and will recommend this channel to my friends as well. Thanks ☺️
Hey thanks for being a recurring viewer really appreciate the support 💜, I have scheduled to publish a video on a full testing strategy for NestJs in September. But in the meantime I’m still going to post other NestJs videos and other related topics hope you’ll find them useful as well
The request will mainly reach the gateway first, which is a regular REST API. However, this gateway is getting its data from the microservice through TCP(a lighter version of the HTTP communication protocol).
Can you do video about chat app with socket io , until now i don't understand the difference between socket and io variables , i watched a lot of videos but yours are more informative , thank you
It would be much appreciated to do a playlist of building bookstore multivendor app using nestjs micro services for the backend qnd nextjs for the frontend. Thanks for your explanation it great keep it up 👍🏼
Hey @suttnysetia thank you so much for the continuous support 💜 Already working on the next 3 NestJS videos, one will be about swagger, another one on database and another one on testing. But I'll also be publishing on other topics alongside 💪
@@TechVisionExplained Sounds like you already have some great videos planned, looking forward to swagger & testing. I think a video on handling logging & global error handling in production could be helpful.