Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Linkerd continues to send traffic to k8s endpoints after service is removed #1612

@klingerf

Description

@klingerf

(note: have tested this on linkerd 1.1.3 and 1.2.0-rc1, and the behavior is the same, so this was not introduced by #1603)

Removing a Kubernetes service should stop traffic to all instances of that service. Instead, linkerd continues to route traffic to all of the endpoints that existed when the service was removed, but the list of endpoints stops receiving updates.

To test this in Kubernetes, I deployed two services: hello1 and world1. In the dtab playground, I added a fallback rule that would first attempt to route traffic traffic to hello1, and fall back to world1. The dtab resolution for this setup looks like:

screen shot 2017-08-25 at 1 51 24 pm

This is what I would expect. However, if I remove the hello1 service (kubectl delete svc/hello1), the dtab resolution stays exactly the same. I would instead expect for the hello1 service to go negative, and the resolution to look like this:

screen shot 2017-08-25 at 1 54 23 pm

Interestingly, I got the second screenshot by keeping the service in place, but scaling the instances of the service down to 0 (kubectl scale deploy/hello1 --replicas=0). It's debatable whether or not this situation should actually fallback to the world1 service; the hello1 service still exists but it's empty, and traditionally we've treated empty serversets as valid configurations that would not trigger a fallback, though I think that may have changed that recently.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions