DEV Community

Discussion on: Build an API Gateway with NestJs in 10 minutes

Collapse
 
danmt profile image
Daniel Marin

Hi Bram, thank you for taking the time to go over the tutorial.

Regarding the first question, this implementation uses the first solution, I'm there with you, I believe the second solution is better from an architectural POV and it's achievable by using the Dynamic Modules technique you can find here docs.nestjs.com/fundamentals/dynam....

With the second question, you could do that as long as your microservices are behind a load balancer. As far as I can tell, there's no out-of-the-box solution for load balancing in NestJS but if they are behind a load balancer, the API Gateway won't really matter which instance it's working with.

I hope this clarifies your questions. I've got a ton of feedback with this article and I'm thinking on giving it a Part II, I'll take your suggestion on elaborating these limitations in it.

Thanks again for reaching out, feel free to ask any questions and sorry for the delay.