Tracing request path in linkerd

How does my k8s look like?

I have a simple 3 node k8s cluster, (I wanted to keep it simple to understand so I created a 3 node cluster)

  • master
  • node1
  • node2

I deployed linkerd as daemonset and hello-world app as replication controller with 2 replicas with service deployment and got the pods deployed in this fashion,

  • master(k8s specific pods)
  • node1 (Linkerd, helloworld-replica1)
  • node2 (helloworld-replica2)

Possible paths here

http_proxy=$(kubectl get svc l5d -o jsonpath="{.status.loadBalancer.ingress[0].*}"):4140 curl http://helloworld-service

My request to hello-world through linkerd will take two possible paths,

either

curl -> l5d -> ELB -> helloworld-replica1 (in node1)

or

curl -> l5d -> ELB -> helloworld-replica2 (in node2)

What is my Question
is it possible for the linkerd to identify every time, if the request is going to node1 or node2 ?
at configuration level or at source code level?

Thank you

If Linkerd is deployed as a daemonset, there should be a Linkerd instance running on node2 as well.

The possible paths are:

curl -> ELB -> (l5d node1):4140 (outgoing) ->  (node1 l5d):4141 (incoming) -> helloworld-replica1
curl -> ELB -> (l5d node1):4140 (outgoing) ->  (node2 l5d):4141 (incoming) -> helloworld-replica2
curl -> ELB -> (l5d node2):4140 (outgoing) ->  (node1 l5d):4141 (incoming) -> helloworld-replica1
curl -> ELB -> (l5d node2):4140 (outgoing) ->  (node2 l5d):4141 (incoming) -> helloworld-replica2

Note that the Linkerd’s incoming router will always forward to application instances on the same node. You can use distributed tracing to see exactly which node each request went to.

1 Like

Strictly, as daemonset doesn’t ensures that. From k8s doc “A DaemonSet ensures that all (or some) nodes run a copy of a pod”.
Well, the zipkins distributed tracing is great help! :slight_smile:

@zshaik FWIW, my interpretation of that line in the K8s docs is that a DaemonSet can optionally be restricted to only apply to a subset of the nodes. In the absence of these restrictions, deploying as a DaemonSet will ensure that the pod runs on every node.

1 Like