storj/drpc

drpc is a lightweight, drop-in replacement for gRPC

Go

1,633

209 commits

updated Oct 5, 2026

See the code

README

DRPC

A drop-in, lightweight gRPC replacement.

Go Report Card Go Doc Beta Zulip Chat

Highlights

  • Simple, at just a few thousand lines of code.
  • Small dependencies. Only 3 requirements in go.mod, and 9 lines of go mod graph!
  • Compatible. Works for many gRPC use-cases as-is!
  • Fast. DRPC has a lightning quick wire format.
  • Extensible. DRPC is transport agnostic, supports middleware, and is designed around interfaces.
  • Battle Tested. Already used in production for years across tens of thousands of servers.

External Packages

  • go.bryk.io/pkg/net/drpc

    • Simplified TLS setup (for client and server)
    • Server middleware, including basic components for logging, token-based auth, rate limit, panic recovery, etc
    • Client middleware, including basic components for logging, custom metadata, panic recovery, etc
    • Bi-directional streaming support over upgraded HTTP(S) connections using WebSockets
    • Concurrent RPCs via connection pool
  • go.elara.ws/drpc

    • Concurrent RPCs based on yamux
    • Simple drop-in replacements for drpcserver and drpcconn
  • Open an issue or join the Zulip chat if you'd like to be featured here.

Examples

Other Languages

DRPC can be made compatible with RPC clients generated from other languages. For example, Twirp clients and grpc-web clients can be used against the drpchttp package.

Native implementations can have some advantages, and so some support for other languages are in progress, all in various states of completeness. Join the Zulip chat if you want more information or to help out with any!

Licensing

DRPC is licensed under the MIT/expat license. See the LICENSE file for more.


Benchmarks

These microbenchmarks attempt to provide a comparison and come with some caveats. First, it does not send data over a network connection which is expected to be the bottleneck almost all of the time. Second, no attempt was made to do the benchmarks in a controlled environment (CPU scaling disabled, noiseless, etc.). Third, no tuning was done to ensure they're both performing optimally, so there is an inherent advantage for DRPC because the author is familiar with how it works.

MeasureBenchmarkSmallMediumLarge
gRPCDRPCdeltagRPCDRPCdeltagRPCDRPCdelta
time/opUnitary29.7µs8.3µs-72.18%36.4µs11.3µs-68.92%1.70ms0.54ms-68.24%
Input Stream1.56µs0.79µs-49.07%3.80µs2.04µs-46.28%784µs239µs-69.48%
Output Stream1.51µs0.78µs-48.47%3.81µs2.02µs-47.06%691µs224µs-67.55%
Bidir Stream8.79µs3.25µs-63.07%13.7µs5.0µs-63.73%1.73ms0.47ms-72.72%
speedUnitary70.0kB/s240.0kB/s+242.86%56.3MB/s181.1MB/s+221.52%618MB/s1939MB/s+213.84%
Input Stream1.28MB/s2.52MB/s+96.11%540MB/s1006MB/s+86.16%1.34GB/s4.38GB/s+226.51%
Output Stream1.33MB/s2.57MB/s+93.88%538MB/s1017MB/s+89.14%1.52GB/s4.68GB/s+208.05%
Bidir Stream230kB/s616kB/s+167.93%149MB/s412MB/s+175.73%610MB/s2215MB/s+262.96%
mem/opUnitary9.42kB1.42kB-84.95%22.7kB7.8kB-65.61%6.42MB3.16MB-50.74%
Input Stream465B80B-82.80%7.06kB2.13kB-69.87%3.20MB1.05MB-67.10%
Output Stream360B80B-77.81%6.98kB2.13kB-69.52%3.20MB1.05MB-67.21%
Bidir Stream1.09kB0.24kB-77.94%14.4kB4.3kB-69.90%6.42MB2.10MB-67.22%
allocs/opUnitary1827-96.15%1849-95.11%2809-96.79%
Input Stream111-90.91%122-83.33%39.22-94.90%
Output Stream111-90.91%122-83.33%382-94.74%
Bidir Stream433-93.02%465-89.13%1405-96.43%

Lines of code

DRPC is proud to get as much done in as few lines of code as possible. It's the author's belief that this is only possible by having a clean, strong architecture and that it reduces the chances for bugs to exist (most studies show a linear correlation with number of bugs and lines of code). This table helps keep the library honest, and it would be nice if more libraries considered this.

PackageLines
storj.io/drpc/drpcstream486
storj.io/drpc/drpchttp478
storj.io/drpc/cmd/protoc-gen-go-drpc428
storj.io/drpc/drpcmanager376
storj.io/drpc/drpcwire363
storj.io/drpc/drpcpool279
storj.io/drpc/drpcmigrate239
storj.io/drpc/drpcserver164
storj.io/drpc/drpcconn134
storj.io/drpc/drpcsignal133
storj.io/drpc/drpcmetadata115
storj.io/drpc/drpcmux95
storj.io/drpc/drpccache54
storj.io/drpc47
storj.io/drpc/drpctest45
storj.io/drpc/drpcerr42
storj.io/drpc/drpcctx41
storj.io/drpc/internal/drpcopts30
storj.io/drpc/drpcstats25
storj.io/drpc/drpcdebug22
storj.io/drpc/drpcenc15
Total3611
drpc
go
grpc
microservices
nanoservices
proto
rpc

storj/drpc

drpc is a lightweight, drop-in replacement for gRPC

Go

1,633

209 commits

updated Oct 5, 2026

See the code

README

DRPC

A drop-in, lightweight gRPC replacement.

Go Report Card Go Doc Beta Zulip Chat

Highlights

  • Simple, at just a few thousand lines of code.
  • Small dependencies. Only 3 requirements in go.mod, and 9 lines of go mod graph!
  • Compatible. Works for many gRPC use-cases as-is!
  • Fast. DRPC has a lightning quick wire format.
  • Extensible. DRPC is transport agnostic, supports middleware, and is designed around interfaces.
  • Battle Tested. Already used in production for years across tens of thousands of servers.

External Packages

  • go.bryk.io/pkg/net/drpc

    • Simplified TLS setup (for client and server)
    • Server middleware, including basic components for logging, token-based auth, rate limit, panic recovery, etc
    • Client middleware, including basic components for logging, custom metadata, panic recovery, etc
    • Bi-directional streaming support over upgraded HTTP(S) connections using WebSockets
    • Concurrent RPCs via connection pool
  • go.elara.ws/drpc

    • Concurrent RPCs based on yamux
    • Simple drop-in replacements for drpcserver and drpcconn
  • Open an issue or join the Zulip chat if you'd like to be featured here.

Examples

Other Languages

DRPC can be made compatible with RPC clients generated from other languages. For example, Twirp clients and grpc-web clients can be used against the drpchttp package.

Native implementations can have some advantages, and so some support for other languages are in progress, all in various states of completeness. Join the Zulip chat if you want more information or to help out with any!

Licensing

DRPC is licensed under the MIT/expat license. See the LICENSE file for more.


Benchmarks

These microbenchmarks attempt to provide a comparison and come with some caveats. First, it does not send data over a network connection which is expected to be the bottleneck almost all of the time. Second, no attempt was made to do the benchmarks in a controlled environment (CPU scaling disabled, noiseless, etc.). Third, no tuning was done to ensure they're both performing optimally, so there is an inherent advantage for DRPC because the author is familiar with how it works.

MeasureBenchmarkSmallMediumLarge
gRPCDRPCdeltagRPCDRPCdeltagRPCDRPCdelta
time/opUnitary29.7µs8.3µs-72.18%36.4µs11.3µs-68.92%1.70ms0.54ms-68.24%
Input Stream1.56µs0.79µs-49.07%3.80µs2.04µs-46.28%784µs239µs-69.48%
Output Stream1.51µs0.78µs-48.47%3.81µs2.02µs-47.06%691µs224µs-67.55%
Bidir Stream8.79µs3.25µs-63.07%13.7µs5.0µs-63.73%1.73ms0.47ms-72.72%
speedUnitary70.0kB/s240.0kB/s+242.86%56.3MB/s181.1MB/s+221.52%618MB/s1939MB/s+213.84%
Input Stream1.28MB/s2.52MB/s+96.11%540MB/s1006MB/s+86.16%1.34GB/s4.38GB/s+226.51%
Output Stream1.33MB/s2.57MB/s+93.88%538MB/s1017MB/s+89.14%1.52GB/s4.68GB/s+208.05%
Bidir Stream230kB/s616kB/s+167.93%149MB/s412MB/s+175.73%610MB/s2215MB/s+262.96%
mem/opUnitary9.42kB1.42kB-84.95%22.7kB7.8kB-65.61%6.42MB3.16MB-50.74%
Input Stream465B80B-82.80%7.06kB2.13kB-69.87%3.20MB1.05MB-67.10%
Output Stream360B80B-77.81%6.98kB2.13kB-69.52%3.20MB1.05MB-67.21%
Bidir Stream1.09kB0.24kB-77.94%14.4kB4.3kB-69.90%6.42MB2.10MB-67.22%
allocs/opUnitary1827-96.15%1849-95.11%2809-96.79%
Input Stream111-90.91%122-83.33%39.22-94.90%
Output Stream111-90.91%122-83.33%382-94.74%
Bidir Stream433-93.02%465-89.13%1405-96.43%

Lines of code

DRPC is proud to get as much done in as few lines of code as possible. It's the author's belief that this is only possible by having a clean, strong architecture and that it reduces the chances for bugs to exist (most studies show a linear correlation with number of bugs and lines of code). This table helps keep the library honest, and it would be nice if more libraries considered this.

PackageLines
storj.io/drpc/drpcstream486
storj.io/drpc/drpchttp478
storj.io/drpc/cmd/protoc-gen-go-drpc428
storj.io/drpc/drpcmanager376
storj.io/drpc/drpcwire363
storj.io/drpc/drpcpool279
storj.io/drpc/drpcmigrate239
storj.io/drpc/drpcserver164
storj.io/drpc/drpcconn134
storj.io/drpc/drpcsignal133
storj.io/drpc/drpcmetadata115
storj.io/drpc/drpcmux95
storj.io/drpc/drpccache54
storj.io/drpc47
storj.io/drpc/drpctest45
storj.io/drpc/drpcerr42
storj.io/drpc/drpcctx41
storj.io/drpc/internal/drpcopts30
storj.io/drpc/drpcstats25
storj.io/drpc/drpcdebug22
storj.io/drpc/drpcenc15
Total3611
drpc
go
grpc
microservices
nanoservices
proto
rpc

Project health

Overall

4.1/10

Maintained

3/10

Code review

0/10
OpenSSF Scorecard

Go module

Latest release

v1.0.0 · Jul 14, 2025

Releases this year

0

Significant stargazers

(top 24 of 46)

CrazyMax

2,810 followers · starred Apr 2021

Simon Cruanes

467 followers · starred May 2021

fsouza

0 followers · starred Aug 2022

Alec Thomas

1,436 followers · starred Apr 2021