what is the best design to use for 10 microservices in NestJS [closed]

We have a couple of microservices in our web platform each microservice today has a kong route url for example https://usersservice.mycompany.com/ each microservice serves an API endpoint for example https://usersservice.mycompany.com/api/v1/users/ Today these microservices are developed using NodeJS/Express

We are converting our microservices to NestJS https://docs.nestjs.com/microservices/basics

In NestJS, should we keep using the https API endpoint url for each microservice. Or instead, use the NestJS Gateway solution like exists here for example: https://www.youtube.com/watch?v=C250DCwS81Q

  • we will have about 10 microservices
  • these microservices will be Multi-Tentant and will server around 20 customers in each Azure cluster. there will be high amount of traffic to these microservices.
  1. is it better to use a Gateway for all the microservices? or have keep having a seperated URL kong route (https) for each microservices, considering security, scalability, high demand traffic
  2. and if using Gateway is recommend, then NestJS which transport should I choose, which transport is recommended for me? according to the NestJS docs, these are the transport type that can be used for microservies: tcp, redis, kafka, rabbit, nats, mqtt, grpc

https://docs.nestjs.com/microservices/basics

Leave a Comment