Open-source project
grpc/grpc-go avatar
grpc/grpc-go

grpc-go: the Go implementation of gRPC, and what it costs you to adopt it

The Go language implementation of gRPC. HTTP/2 based RPC

23,110 stars4,822 forksGoApache-2.0

At a glance

What is it?
grpc-go is the reference Go runtime for gRPC over HTTP/2, published as google.golang.org/grpc under Apache-2.0. It is a strong fit for typed service-to-service calls, and a poor fit if you want a plain browser-facing API.
Who is it for?
gRPC-Go is useful for typed RPC between services and generated clients, including streaming workloads. Browser and JSON clients can use additional approaches such as gRPC-Web or a gateway, with their own limitations and deployment cost.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • grpc/grpc-go23,110 ★ · +40
Star history
Repository2026-09-212026-11-14
grpc/grpc-go23.1k23.1k

40 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What grpc-go solves, and who ends up using it

The README describes grpc-go as "The Go language implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first." That sentence is the whole pitch. You have a service boundary, you want the contract written down once, and you want the client and server to agree on it without a human maintaining two copies. grpc-go is the Go side of that arrangement.

The people who end up with it in their go.mod are usually not choosing it in isolation. They are joining a system where another team already publishes a .proto file, or where an internal platform has settled on gRPC for east-west traffic. Go is then one of several language runtimes in that system, and grpc-go is the one that speaks the same wire protocol as the rest.

It is a poor fit for a solo developer who wants to expose a JSON endpoint to an unknown public audience. For browser clients, gRPC-Web and HTTP/JSON gateways offer integration paths but add components and have their own protocol limitations. Evaluate those against a direct HTTP API.

How the runtime is laid out: transports, balancers, resolvers, interceptors

The repository layout tells you more about the architecture than the README does. Alongside clientconn.go and call.go sit directories named balancer, credentials, keepalive, metadata, codes, connectivity, channelz, binarylog, health, authz, orca and interop. Each of those is a seam in the same machine.

A ClientConn is not a socket. It is a handle that owns name resolution, a balancer that decides which subconns to use, and a set of subchannels underneath. When you dial, the target string is resolved, the balancer is handed the resulting addresses, and RPCs are picked onto a subchannel. That is why a single ClientConn can survive a backend rolling restart while individual connections drop.

The transport itself is HTTP/2, which is what the description means by "HTTP/2 based RPC". Status is carried in codes, metadata travels in metadata, and streaming is a first-class method shape rather than something bolted on. Interceptors sit at the call boundary, so logging, auth and retry logic wrap the call instead of living inside every handler.

The dependency list in go.mod confirms how much of this is delegated. The module requires golang.org/x/net, google.golang.org/protobuf, google.golang.org/genproto/googleapis/rpc, github.com/envoyproxy/go-control-plane and the OpenTelemetry SDK packages. xDS support and observability are not afterthoughts; they are declared as requirements of the module you import.

Installing grpc-go and making a first call

The README's installation section is one sentence: add the import, and go build, go run or go test will fetch the dependencies automatically. There is no installer and no CLI to put on your PATH.

go
import "google.golang.org/grpc"

That is the entire documented install step. In practice you will also need a generated service stub, which the repository's examples and the Go gRPC docs cover. The examples directory holds helloworld and route_guide, plus a gotutorial.md, and examples/go.mod is a separate module.

The prerequisite is explicit: any one of the two latest major Go releases. An older toolchain may be unsupported or unable to build a selected release; check its `go.mod` and support policy rather than assuming every older version fails.

If you are behind a network that cannot reach golang.org, the README's FAQ gives a module replace as the workaround:

sh
go mod edit -replace=google.golang.org/grpc=github.com/grpc/grpc-go@latest
go mod tidy
go mod vendor
go build -mod=vendor

The README warns that you need the same treatment for every transitive dependency hosted on golang.org, and links to golang/go issue #28652 for the details. This is a build-environment problem, not a grpc-go problem, but it is the first thing that stops people.

When something misbehaves, the README documents two environment variables that turn on the default logger:

console
export GRPC_GO_LOG_VERBOSITY_LEVEL=99
export GRPC_GO_LOG_SEVERITY_LEVEL=info

Set them on both the client and the server. The README is specific about that, and the reason is in the next section.

The failure mode the README spends the most words on

The most detailed troubleshooting entry in the README is the error "code = Unavailable desc = transport is closing". The README lists four possible causes: mis-configured transport credentials that failed during handshaking, bytes disrupted possibly by a proxy in between, server shutdown, and keepalive parameters that caused the connection to be shut down.

The fourth one is the interesting case, and it is a design trap. If a server is configured to terminate connections periodically in order to trigger DNS lookups, long-running RPCs get killed by the server's own housekeeping. The README's suggested remedy is to increase MaxConnectionAgeGrace so that longer calls can finish.

The error surfaces on the client, but the cause can involve credentials, either endpoint or an intermediary. Correlate client and server logs with proxy and network evidence before changing timeouts or retry behavior.

There is a second failure mode in the FAQ, less dramatic but more common in new projects: a compile error reading undefined: grpc.SupportPackageIsVersion. The README's answer is to update with go get google.golang.org/grpc. That error means generated code and runtime are from different generations, and the README's fix is to update the runtime.

Where grpc-go is the wrong tool

Native gRPC-Go does not by itself provide a conventional browser or JSON API. gRPC-Web and HTTP/JSON gateways are available approaches, but they add infrastructure and have feature and protocol constraints; assess the client requirements and the gateway's documentation.

Streaming is the other place where the fit matters. gRPC method shapes include client streaming, server streaming and bidirectional streaming. Those are natural over HTTP/2 and awkward to reproduce over request-response infrastructure. If your traffic is genuinely one request, one response, and your clients are heterogeneous and untrusted, the HTTP/2 requirement buys you less than the generated-code requirement costs.

There is also a versioning constraint worth naming. The prerequisite is the two latest major Go releases. A team that upgrades Go slowly will spend part of every Go release cycle checking whether grpc-go still builds on their pinned toolchain. That is a real tax, and it is stated in the README rather than hidden.

Finally, the module is not small. go.mod pulls in xDS control-plane types, OpenTelemetry SDK packages and cloud auth libraries. If you wanted a minimal RPC layer, you are importing a considerable dependency graph to get one.

What to compare it against, and how the approaches differ

The honest alternative is net/http with encoding/json, both in the Go standard library. The README links a performance benchmark but no comparison with net/http, so the difference to weigh is where the contract lives.

An HTTP/JSON API can use a shared schema and generated clients, while gRPC commonly uses generated code from a .proto contract. Both require compatibility discipline: independently deployed clients and servers can encounter version skew at runtime even when their own builds succeed. Compare tooling, transports, evolution rules and observability for your system.

A second alternative is to stay on gRPC but not on this runtime, using the gRPC implementation of another language for the service in question. That is not really an alternative if the service is written in Go. It matters when you are choosing which language to write the service in, because the .proto contract is portable across runtimes and the Go runtime is only one of them.

What grpc-go is not an alternative to is a message broker. The README describes an RPC framework. Publish-subscribe semantics are not part of it.

Maintenance, releases and the licence you are accepting

The repository is not archived, and the last push was on 2026-10-29. The most recent release listed is v1.85.0 on 2026-10-27, preceded by v1.84.0 on 2026-09-17 and v1.83.2 on 2026-08-25. That is a steady release cadence.

For upgrade cost, the practical unit is the minor version. The module path is versioned in the usual Go way, so go get google.golang.org/grpc moves you forward, and the README's own advice for the SupportPackageIsVersion compile error is exactly that command. The risk in an upgrade is regenerated stubs drifting from checked-in ones, which is why the Makefile matters: make proto runs go generate and refuses to proceed if protoc is not installed.

makefile
proto:
	@ if ! which protoc > /dev/null; then \
		echo "error: protoc not installed" >&2; \
		exit 1; \
	fi
	go generate google.golang.org/grpc/...

The Makefile also defines vet, test and testrace targets, with testrace running go test -race. If you vendor or fork anything, those are the checks the project runs on itself.

The licence is Apache-2.0, with a NOTICE.txt and AUTHORS file in the repository root. Apache-2.0 includes an explicit patent grant and requires that you preserve notices. This is a description of the licence file, not legal advice; if you are redistributing a modified copy, read LICENSE and NOTICE.txt yourself.

Editorial conclusion

gRPC-Go is useful for typed RPC between services and generated clients, including streaming workloads. Browser and JSON clients can use additional approaches such as gRPC-Web or a gateway, with their own limitations and deployment cost. Check the selected version's Go requirement, transport configuration, security, deadlines and compatibility strategy before deployment.

Frequently asked questions

Is grpc-go better than a REST API?

Neither is universally better. gRPC commonly uses Protocol Buffers and HTTP/2 for typed RPC and streaming; REST-style HTTP APIs can use independently specified contracts and suit broad HTTP/JSON clients. Compare client support, tooling, streaming and operational needs.

Does grpc-go run over HTTP?

The repository description calls grpc-go "HTTP/2 based RPC", and the README's error list mentions a proxy in between as a possible cause of disrupted bytes. That is HTTP/2 specifically, not HTTP/1.1, so intermediaries that only understand HTTP/1.1 are a problem rather than a transport.

What are the downsides of using grpc-go?

Potential tradeoffs include generated code, HTTP/2-capable infrastructure, browser integration and dependency or toolchain requirements. An `Unavailable` transport error can arise from credentials, network intermediaries, server shutdown or configuration; investigate client, server and network evidence.

What does grpc-go stand for?

The README expands the name only as the Go implementation of gRPC, which it describes as a general RPC framework. The repository does not spell out the acronym anywhere in the README.

Official sources

  1. grpc/grpc-go on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/grpc-grpc-go.svg)](https://hysenlabs.com/projects/grpc-grpc-go)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/grpc-grpc-go.svg)](https://hysenlabs.com/projects/grpc-grpc-go)

Was this useful?