add caching for remembering state of nodes
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Buildx does a lot of connections to the remote daemon to check existing state. Especially when using ssh transport the connection handshake is slow and this phase may take even more time than actual build.
For example when using 18.09 node:
docker context create foo --host ssh://node && docker context use foo
Before we can build (at least) following connections happen
- cli calls ping before buildx main is called
- buildx calls ping to optionally negotiate lower version
- buildx calls /grpc to check if docker driver can be used
- this fails to buildx calls /inspect to see if container is running
- buildx actually starts the build connection
First ping is completely not needed but not sure if we can step around that. For /grpc support we can remember the state or deduct it from ping response.
Theoretically, we could avoid inspect and only call it when interactions with the container fail.
We could think about forcing http2 and reusing the connection.
@tiborvass
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the SSH transport sequence through the listed ping, /grpc, /inspect, and build connections, starting with the code that performs those remote checks. Define the caching or connection-reuse scope and verify that builds avoid redundant handshakes without breaking driver detection or fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, networking, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100