Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 28, 2026·3 min de lecture

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.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Kitex RPC Framework
Commande d'installation directe
npx -y tokrepo@latest install 5fe2382f-5ad3-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en 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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires