-
Notifications
You must be signed in to change notification settings - Fork 137
proposal: executors, that publish DiscoveryInfo, should get A and SRV records #233
Comments
This all sounds perfectly reasonable overall. A few questions and remarks:
|
initial thinking was that it would help to distinguish between executor names and hashed executor ids. it doesn't really reduce the opportunity for collisions, unless people recognize that they may not want to use the
may need salt to get a reasonable bit distribution in the hash function. salt isn't a hard requirement for me.
sounds good to me, i'll update the proposal.
yes, i'll make that clear in the proposal.
we probably could. that sounds like another proposal :) |
Thanks for the answers. Regarding the |
Probably doesn't matter to mesos-dns; might matter to humans. On Fri, Aug 14, 2015 at 11:39 AM, Tomás Senart [email protected]
|
this proposal establishes a new namespace for executor-provided services in mesos-dns:
{framework}.exec.{domain}
for example, in kubernetes-mesos the executor runs a "kubelet" and "kube-proxy" process, both of which are shared across all tasks on slave. each process exposes useful ports. it would be nice to somehow address the services on these ports.
it's important to remember that in kubernetes-world, every task is a pod and so each task is already assigned to its own netns (and gets its own IP address, etc). the scheduler will likely also be dynamically allocating ports for each task on the slave host and that these task ports have nothing to do with dynamically allocated executor ports.
examples of services exposed by kubelet and kube-proxy:
perhaps one way generate records for these executor-provided services would be:
{framework}.exec.mesos
{ename}.{framework}.exec.mesos
{ename}
eid-{eid-hash}.{framework}.exec.mesos
executor.id
_{port-name}._{proto}.{framework}.exec.mesos
eid-{eid-hash}.{framework}.exec.mesos:{di-port-number}
where (the following are required):
{eid-hash}
--> hash-of(ExecutorInfo.id + framework-id + slave-id + other salt); for uniqueness{ename}
--> ExecutorInfo.discovery.name, or else ExecutorInfo.name{port-name}
--> ExecutorInfo.discovery.ports.ports[x].name{di-port-number}
--> ExecutorInfo.discovery.ports.ports[x].number{proto}
--> ExecutorInfo.discovery.ports.ports[x].protocol, or else both_tcp
and_udp
{framework}
--> name of the framework instance running on the clusterthe above allows us to identify the location of all kubelet API services in the cluster via:
_api._tcp.kubernetes.exec.mesos
furthermore, if the
hash-of(.. + salt)
algorithm is known to the framework, the k8s framework can refer to specific executor instances (aka k8s "nodes") via the executor-id hashed name:eid-{eid-hash}.{framework}.exec.mesos
(+) this approach is compatible with multiple instances of the same framework in the same cluster, provided that they are registered with different framework names
(+) this approach is compatible with multiple framework executors (for a single framework) running on a single slave, provided that they have unique names
(+) this approach is compatible with the recent A and SRV record generation semantics recently introduced for the
{framework}.slave.mesos
namespace, established by #226/cc @kozyraki @tsenart @sttts
The text was updated successfully, but these errors were encountered: