Skip to content

Create PostUploadPackWithSidechannel

For gitlab-com/gl-infra/scalability#1219 (closed)

In !3768 (merged), we finished the implementation of sidechannel protocol, as a sub-protocol of backchannel. This MR is to apply sidechannel to implement PostUploadPackWithSidechannel, which is a new RPC aiming to replace PostUploadPack.

Recently, PostUploadPack is a gRPC streaming call that streams the stdin/stdout between client and server's git processes. We wrap the data in PostUploadPackRequest and PostUploadPackResponse. This practice is inefficient as gRPC becomes a bottleneck. The new RPC PostUploadPackWithSidechannel solves this issue by opening a sidechannel connection to transfer the data without going through gRPC. As a result, this RPC has different semantics from the original RPC. The RPC is a unary gRPC call, instead of a streaming one. The call's request is a PostUploadPackWithSidechannelRequest object, which is similar to PostUploadPackRequest excluding data . The response is empty. It doesn't matter, since all the data are exchanged via the sidechannel connection. If there is an error in between, it is reflected in the returned error of the unary call.

Edited by Quang-Minh Nguyen

Merge request reports

Loading