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

Use http 2.0 multiplexing for remote API #7673

Closed
phemmer opened this issue Aug 21, 2014 · 0 comments
Closed

Use http 2.0 multiplexing for remote API #7673

phemmer opened this issue Aug 21, 2014 · 0 comments

Comments

@phemmer
Copy link
Contributor

phemmer commented Aug 21, 2014

While http 2.0 isn't finalized yet, it is in draft phase, and only a few months from being submitted (Nov 2014). There are a few things which I think would benefit greatly by taking advantage of the multiplexing capability.

The most obvious and beneficial use case I see is attaching to containers. Right now, if you want to connect to STDIN/STDOUT/STDERR of a running container, the process/protocol is rather cumbersome. Utilizing a transport protocol which supports stream multiplexing would make this process a lot simpler. Custom clients wishing to attach using the remote API would then be able to use standard http 2.0 libraries, instead of having to hand-code the protocol.

This would also make it a lot more flexible for adding additional streams. I'll use one of my own issues here as an example, #6396. This issue is to allow forwarding the ssh key agent to the daemon so that it can be used by containers. Doing so requires establishing another stream to the daemon. For output, this isn't an issue as the attach call sends each chunk of data prefixed with the stream number. However for input this isn't possible as the daemon assumes all input is STDIN.
Utilizing http 2.0 would make this sort of extension very easy.

There are other less significant, but still beneficial, uses such as being able to use the same TCP connection for uploading & downloading images in parallel.

 

There's a list of libraries implementing HTTP 2.0 at https://github.com/http2/http2-spec/wiki/Implementations which lists one for GO at https://github.com/Jxck/http2.

@phemmer phemmer closed this as completed Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant