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

Detect protocols based on request header #2008

Open
1 of 2 tasks
utrack opened this issue Jun 20, 2018 · 1 comment
Open
1 of 2 tasks

Detect protocols based on request header #2008

utrack opened this issue Jun 20, 2018 · 1 comment

Comments

@utrack
Copy link
Contributor

utrack commented Jun 20, 2018

Issue Type:

  • Bug report
  • Feature request

Right now we need separate routers on different ports to process requests of different protocols.
Maybe we could run a single proxy for multiple routers if declared port for one overlaps with the other, and detect the protocol type based on a header of a request?

i.e.

- label: http-incoming
  protocol: http
  interpreter:
    kind: io.l5d.namerd
    dst: /#/io.l5d.k8s/linkerd/thrift/namerd
    namespace: incoming
  servers:
  - port: 4141
    ip: 0.0.0.0

- label: h2-incoming
  protocol: h2
  interpreter:
    kind: io.l5d.namerd
    dst: /#/io.l5d.k8s/linkerd/thrift/namerd
    namespace: incoming
  servers:
  - port: 4141
    ip: 0.0.0.0

Proxy on port 4141 should accept HTTP and H2 requests, detecting a protocol based on headers.
It definitely can be done, see https://github.com/soheilhy/cmux

@adleong
Copy link
Member

adleong commented Jun 26, 2018

This is very cool. We actually already do this in Conduit (soon to become Linkerd 2.0). Adding this functionality to Linkerd, unfortunately, would be a large amount of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants