Hyperledger Fabric Service Discovery With Multiple Host #fabric-questions


rajasalok1996@...
 

I wanted to use discovery service on a multi-host network(which we're using for production).  But I wanted to run the node service in such a way, that even if I don't run the service in the same docker swarm, all the request go through. So I had looked the way people normally use  fabric discovery :
await channel.initialize({discover:true, asLocalhost:true})
I can't use it this as `asLocalhost`, replaces the hostname with localhost. Moreover, even if the port for peer is not mapped at 7051 the code does not work. 
So ideally I was looking for a way to map the returning hostname and port, with one in configuration. I looked inside the code https://github.com/hyperledger/fabric-sdk-node/blob/v1.4.4/fabric-client/lib/Channel.js#L253, I found out that if we're using service discovery there's no flag or a way to change the url mapping. So using fabric's service discovery with multi-host network is not possible ?