3 ms·
Normally I'm all for people using tried and tested primitives for things, however I think that in this case unix sockets are probably not the right choice. Fir
by KaiserPro 5y ago
Normally I'm all for people using tried and tested primitives for things, however I think that in this case unix sockets are probably not the right choice.
Firstly you are creating a hard dependency for having the two services sharing a same box, with a shared file system (that's difficult to coordinate and secure.) But also should you add a new service that also want to connect via unix socket, stuff could get tricky to orchestrate.
But this also limits your ability to move stuff about, should you need it.
Inside a container, I think its probably a perfectly legitimate way to do IPC. Between containers, I suspect you are asking for trouble.
- akvadrako 5y agoWithin a pod it seems pretty reasonable.
- erulabs 5y agoExactly, and this is where the concept of "Pod" really shines. Sharing networking and filesystems between containers is, from time to time, exactly the right strategy, as long as it can be encapsulated.
- auspex 5y agoUnix socket requires elevated privileges that containers shouldn’t have in the first place.
- paulfurtado 5y agoUnix sockets only require as much permission as creating a file in a directory. If a program has write access to a directory, it can create a unix socket. File permission on the socket then dictate which users may connect to it.