Hello, wt., 20 lip 2021 o 16:51 Cosmin <cosmin.comarnice...@gmail.com> napisał(a):
> Hello all, > > I have the following processes communicating on the same PC: > > > [image: Example.jpg] > > P1, P2, P3.... all have the same service interface -> just different > instances of the same service. > Client and server communicate on localhost port 10000 for example. Base on > some information received from the client the server will start a new > process P1. or P2, or P3..or how many it needs ( P1 - is actually a server > that will start listening on localhost port 10001 for example ) > Then the client will discuss directly with P1, P2, P3, ... depending on > it's needs > > The problem with this is that P1, P2, P3... beeing the same service, I > cannot start them on the same localhost port, and because I might have a > lot of these processes I will use a large amount of ports -> not a good > practice. > What exactly do you want to achieve in this setup? If all P1, P2 and P3 are the exact same service (same binary) and you want to get a better concurrency by spawning multiple processes then the best solution would be to use a single process but multiple threads. In this case you can share the single service tcp port with multiple threads without a problem. best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAF_EmoBT3xpVoKwiW1rQEPDju2fr6rRoyuJWoZbrwAdQQKikJQ%40mail.gmail.com.