How to uniquely address a 'process' in a containerised world?

前端 未结 1 1320
-上瘾入骨i
-上瘾入骨i 2021-01-26 02:50

This is a general question but for arguments sake you may and assume we have a collection of processes communicating via a combination of AMQP and HTTP. There are two specific c

相关标签:
1条回答
  • 2021-01-26 03:02

    After some consideration I believe host+pid is still sufficient (but not necessarily the best way) to identify a process providing you are mindful of the following:

    • whose PID you mean could be ambiguous. It could be the PID of the container's namespace or the host.

    • If you are referring to the process from outside the container you need to use the PID of the host not the PID as it appears inside the container as this is in a separate process namespace. See for example the-curious-case-of-pid-namespaces

    • The container may evem be able to identify the host and PID itself (after all it is supposed to be a sandbox)

    • IP addresses will be relative to the internal network (as normal)

    • hostnames will go via DNS lookup (as normal)

    Now a URI refers to a port not a PID so a URI is not appropriate here. PID@HOST is probably a sensible notation but beware confusion with user@host.

    In addition to container and pod Ids there are other more convenient ways to identify a processing resource such as stateful sets

    0 讨论(0)
提交回复
热议问题