TraceMachina / nativelink

NativeLink is an open source high-performance build cache and remote execution server, compatible with Bazel, Buck2, Reclient, and other RBE-compatible build systems. It offers drastically faster builds, reduced test flakiness, and specialized hardware.
https://nativelink.com
Apache License 2.0
1.2k stars 117 forks source link

Move away from tonic's TLS & Connection libraries #1235

Open allada opened 3 months ago

allada commented 3 months ago

In order to get a bit lower and control the network flow, we need to remove tonic's TLS & connection apis/libraries and talk directly to hyper.

The big advantage of doing this is that we will then be able to not be required to talk over TLS channels and can talk over more complex channels, like file sockets. In this specific case, we want to have a custom HTTP upgrade, take the underlying IO socket, then reverse the client/server relationships for the scheduler/worker management. Doing so allows the worker to connect to a scheduler, but then have the worker be the service and the scheduler be the client according to GRPC, but still have all HTTP & TLS securities for the initial connection.

aaronmondal commented 3 months ago

I'm a big fan of this. When I did the hyper 1.x migration I kept thinking that many of the existing tonic wrapping logic is likely obsolete.