go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.
Overview
go-zero combines REST-style APIs and RPC in one Go framework oriented toward microservice deployments. It embeds practices for timeout chains, concurrency limits, rate limiting, adaptive circuit breaking, and load shedding so services can stay up under heavy load with minimal manual tuning.
The goctl tool reads concise API and proto definitions and generates Go server and client code, with optional output for mobile and web client languages. Handlers get automatic request validation, metrics hooks, caching helpers, and patterns compatible with standard net/http routing.
Services can participate in service mesh style discovery and balancing, including Kubernetes DNS-based RPC targets that resolve EndpointSlices in-cluster. The framework documents quick-start flows from an API file to a runnable HTTP server, plus guidance for AI coding assistants to invoke goctl directly or through an optional MCP wrapper.
Design goals stated by the authors emphasize simplicity, high availability under concurrency, failure-oriented protections, and extension through middleware. The project appears in the CNCF landscape as a microservices framework for Go teams building production APIs and RPC backends.
Key features
- goctl API and RPC generation
- Adaptive circuit breakers
- Rate limiting and load shedding
- Automatic request validation
- Built-in metrics and middleware
- Kubernetes RPC discovery
- Multi-language client codegen
- AI assistant workflow docs
Use cases
- High-traffic REST APIs
- Internal microservice RPC
- Kubernetes-native Go services
- Rapid API prototyping with goctl
- Resilient backend modernization