Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsMay 28, 2026·3 min de lectura

Kitex — High-Performance Go RPC Framework by CloudWeGo

Kitex is a high-performance, extensible Go RPC framework built by ByteDance. It supports Thrift, Protobuf, and gRPC protocols with built-in service governance features like circuit breaking, retry, and load balancing.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Kitex RPC Framework
Comando de instalación directa
npx -y tokrepo@latest install 5fe2382f-5ad3-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

Kitex is a Go RPC framework created by ByteDance as part of the CloudWeGo open-source initiative. It is designed for microservice architectures that demand low latency, high throughput, and extensible middleware, providing built-in support for Thrift, Protobuf, and gRPC transports.

What Kitex Does

  • Generates Go server and client code from Thrift or Protobuf IDL files
  • Provides high-performance network transport with connection pooling and multiplexing
  • Includes built-in service governance: circuit breaker, retry, timeout, and load balancing
  • Supports middleware chains for logging, tracing, and metrics collection
  • Integrates with service registries like etcd, Nacos, ZooKeeper, and Consul

Architecture Overview

Kitex uses a layered design: the code generator (kitex tool) produces typed stubs from IDL, the transport layer handles connection management and protocol encoding, and the middleware layer chains interceptors for cross-cutting concerns. The default transport uses Netpoll, a high-performance non-blocking I/O library optimized for Go, which avoids the overhead of goroutine-per-connection models under heavy load.

Self-Hosting & Configuration

  • Install the code generator with go install github.com/cloudwego/kitex/tool/cmd/kitex@latest
  • Define services in Thrift or Protobuf IDL files
  • Run kitex -module <mod> -service <svc> <idl> to generate server scaffolding
  • Configure timeouts, retries, and circuit breakers via client options in code
  • Register with etcd or Nacos for service discovery in production

Key Features

  • Netpoll-based transport delivering low-latency RPC under high concurrency
  • Multi-protocol support: Thrift, Protobuf, and gRPC interoperability
  • Pluggable middleware for observability, auth, and rate limiting
  • Connection multiplexing reduces resource usage for large service graphs
  • Generic call support for dynamic invocation without compiled stubs

Comparison with Similar Tools

  • gRPC-Go — widely adopted but limited to Protobuf; Kitex also supports Thrift natively
  • Dubbo-Go — Java-ecosystem heritage; Kitex is Go-native with Netpoll optimization
  • Kratos — Bilibili's Go framework with HTTP focus; Kitex targets pure RPC workloads
  • go-micro — higher-level abstraction; Kitex offers more control over transport and encoding
  • Twirp — simple Protobuf-over-HTTP; Kitex supports persistent connections and multiplexing

FAQ

Q: Can Kitex interoperate with gRPC services? A: Yes, Kitex supports the gRPC protocol, so Kitex clients can call standard gRPC servers and vice versa.

Q: What serialization formats does Kitex support? A: Thrift (binary, compact), Protobuf, and Flatbuffers via the code generator.

Q: How does Kitex handle service discovery? A: Kitex provides resolver interfaces with official extensions for etcd, Nacos, ZooKeeper, Consul, and Polaris.

Q: Is Kitex production-ready? A: Kitex runs thousands of microservices at ByteDance, handling tens of millions of requests per second.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados