Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specific host transformer #1355

Merged
merged 1 commit into from Jun 7, 2017
Merged

Add specific host transformer #1355

merged 1 commit into from Jun 7, 2017

Conversation

@d10i
Copy link

@d10i d10i commented Jun 2, 2017

Problem
When deploying linkerd in a linker-to-linker + per-host configuration
(i.e. one linkerd container per machine with an incoming router and
outgoing router), the incoming router needs to be able to route the
incoming request to the destination container running on the same
Docker host (i.e. machine).

The destination app container is likely to be registered against
the namer using the IP address of the Docker host it is running on and
the port that is exposed in its Docker container. The problem is that
the incoming router is unaware of the IP address of the Docker host it's
running on so won't know which of the resolved names live on the same
Docker host.

At the moment there is no transformer that can solve this problem as
io.l5d.localhost will only look at network interfaces inside the
Docker container while io.l5d.k8s.daemonset and io.l5d.k8s.localnode
are k8s-specific.

Solution
The specific host transformer filters the list of addresses down to only
addresses that have the same IP address as the specified host. This
transformer can be used by an incoming router to only route traffic to
specific destinations. This way, when linkerd is running inside a Docker
container the traffic can be routed to another Docker container in the
same host.

dario-simonetti
**Problem**
When deploying linkerd in a linker-to-linker + per-host configuration
(i.e. one linkerd container per machine with an incoming router and
outgoing router), the incoming router needs to be able to route the
incoming request to the destination container running on the same
Docker host (i.e. machine).

The destination app container is likely to be registered against
the namer using the IP address of the Docker host it is running on and
the port that is exposed in its Docker container. The problem is that
the incoming router is unaware of the IP address of the Docker host it's
running on so won't know which of the resolved names live on the same
Docker host.

At the moment there is no transformer that can solve this problem as
`io.l5d.localhost` will only look at network interfaces inside the
Docker container while `io.l5d.k8s.daemonset` and `io.l5d.k8s.localnode`
are k8s-specific.

**Solution**

The specific host transformer filters the list of addresses down to only
addresses that have the same IP address as the specified host. This
transformer can be used by an incoming router to only route traffic to
specific destinations. This way, when linkerd is running inside a Docker
container the traffic can be routed to another Docker container in the
same host.
@wmorgan
Copy link
Member

@wmorgan wmorgan commented Jun 2, 2017

@dario-simonetti Thank you! We'll take a look!

@klingerf klingerf added the reviewable label Jun 5, 2017
@adleong
adleong approved these changes Jun 6, 2017
Copy link
Member

@adleong adleong left a comment

This is great and very useful! Thank you!

@adleong adleong merged commit 6973860 into linkerd:master Jun 7, 2017
1 check passed
1 check passed
ci/circleci Your tests passed on CircleCI!
Details
tbrooks8 pushed a commit to tbrooks8/linkerd that referenced this pull request Dec 20, 2018
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.