0

I've a process that has to be spawned on demand whenever a specific event occurs. That process practically hosts a gRpc server, which communicate with its client (the relation is 1-1 so one client served by one server hosted in a disposable process.

My question is.. since the grpc communicate with its client using an Inter-process communication protocol transport, do I force to specify a port at all? Because my problem here is that I cannot run more than one instance of the gRpc server since the port binding cannot be established if it's busy with a previously created instance.

user2896152
  • 762
  • 1
  • 9
  • 32
  • If you don't need ports then why it fails with port binding error? What are you using for inter-process communication? – Evk Nov 30 '22 at 12:50
  • @Evk I'm using unix socket domain as described here: https://learn.microsoft.com/en-us/aspnet/core/grpc/interprocess?view=aspnetcore-7.0 – user2896152 Nov 30 '22 at 13:15
  • And you are using different sockets (socket files) for each instance? – Evk Nov 30 '22 at 13:20
  • @Evk yes, differnt files for each client. – user2896152 Nov 30 '22 at 13:23
  • Then I persnonally don't see what port binding cannot be established here... – Evk Nov 30 '22 at 14:00
  • Is it correct though to use different sockets for each instance? I also implemented the UNIX socket domain from the MS docs, though I only used it with one client concurrently. The way it is defined in the docs, the Kestrel only listens to one socket at a time, why not communicate with multiple clients over this socket? Check out this SO post on [how UNIX domain sockets differentiate between multiple clients](https://stackoverflow.com/questions/9644251/how-do-unix-domain-sockets-differentiate-between-multiple-clients). – dan-kli Dec 06 '22 at 09:16

0 Answers0