Skip to content

Detect protocols based on request header #2008

Open

Description

@utrack

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

Activity

  1. adleong commented on Jun 26, 2018

    @adleong
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    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