0

I am new to microservices and,

I have a module, which have controller and some gateways as well, it handles both HTTP & WS Requests and this is a monolithic NestJS App, on port 3000

I am thinking of how it will unfold in terms of converting this module into a microservice

I do have a api gateway, which is the only endpoint that frontend will connect too

this module/microservice should be only accessible by the peer microservices and api gateway (we dont expose its port publicly)

HOW? If i dont expose the port i cant connect it with WS connection directly from client.

Is there any way ? for API gateway to redirect the incoming api requests (WS) to a different port where the Chat microservice is listening ? (there are workarounds but it gets complex)

OR should i remove api gateway and expose microservices for client to directly access them (ofc we authenticate the incoming request) ?

I havent tried anything yet

0 Answers0