Skip to content

kevwan/kitex

 
 

Repository files navigation

CloudWeGo-Kitex

English | 中文

Kitex [kaɪt'eks] is a high-performance and strong-extensibility Golang RPC framework that helps developers build microservices. If the performance and extensibility are the main concerns when you develop microservices, Kitex can be a good choice.

Basic Features

  • High Performance

Kitex integrates Netpoll, a high-performance network library, which offers significant performance advantage over go net.

  • Extensibility

Kitex provides many interfaces with default implementation for users to customize. You can extend or inject them into Kitex to fulfill your needs (please refer to the framework extension section below).

  • Multi-message Protocol

Kitex is designed to be extensible to support multiple RPC messaging protocols. The initial release contains support for Thrift, Kitex Protobuf and gRPC, in which Kitex Protobuf is a Kitex custom Protobuf messaging protocol with a protocol format similar to Thrift. Kitex also supports developers extending their own messaging protocols.

  • Multi-transport Protocol

For service governance, Kitex supports TTHeader and HTTP2. TTHeader can be used in conjunction with Thrift and Kitex Protobuf; HTTP2 is currently mainly used with the gRPC protocol, and it will support Thrift in the future.

  • Multi-message Type

Kitex supports PingPong, One-way, and Bidirectional Streaming. Among them, One-way currently only supports Thrift protocol, two-way Streaming only supports gRPC, and Kitex will support Thrift's two-way Streaming in the future.

  • Service Governance

Kitex integrates service governance modules such as service registry, service discovery, load balancing, circuit breaker, rate limiting, retry, monitoring, tracing, logging, diagnosis, etc. Most of these have been provided with default extensions, and users can choose to integrate.

  • Code Generation

Kitex has built-in code generation tools that support generating Thrift, Protobuf, and scaffold code.

Documentation

  • Getting Started

  • User Guide

    • Basic Features

      Including Message Type, Supported Protocols, Directly Invoke, Connection Pool, Timeout Control, Request Retry, LoadBalancer, Circuit Breaker, Rate Limiting, Instrumentation Control, Logging and HttpResolver, learn more

    • Governance Features

      Supporting Service Discovery, Monitoring, Tracing and Customized Access Control, learn more

    • Advanced Features

      Supporting Generic Call and Server SDK Mode, learn more

    • Code Generation

      Including Code Generation Tool and Combined Service, learn more

    • Framework Extension

      Providing Middleware Extensions, Suite Extensions, Service Registry, Service Discovery, Customize LoadBalancer, Monitoring, Logging, Codec, Transport Module, Transport Pipeline, Metadata Transparent Transmission, Diagnosis Module, learn more

  • Reference

    • For Transport Protocol, Exception Instruction and Version Specification, please refer to doc
  • FAQ

Performance

We compared the performance of Kitex with some popular RPC frameworks (benchmark), such as gRPC and RPCX, both using Protobuf. The test results show that Kitex performs better.

Note: The performance benchmarks obtained from the experiment are for reference only, because there are many factors that can affect the actual performance in application scenarios.

Test Environment

  • CPU: Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz, 4 cores
  • Memory: 8GB
  • OS: Debian 5.4.56.bsk.1-amd64 x86_64 GNU/Linux
  • Go: 1.15.4

Concurrency Performance

Change the concurrency with a fixed packet size 1KB.

QPS TP99 TP999
image image image

Throughput Performance

Change packet size with a fixed concurrency of 100.

QPS TP99 TP999
image image image

Related Projects

  • Netpoll: A high-performance network library.
  • kitex-contrib: A partial extension library of Kitex, which users can integrate into Kitex through options according to their needs.
  • Example: Use examples of Kitex.

Blogs

Contributing

Contributing.

License

Kitex is distributed under the Apache License, version 2.0. The licenses of third party dependencies of Kitex are explained here.

Community

Landscapes

  

CloudWeGo enriches the CNCF CLOUD NATIVE Landscape.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.6%
  • Thrift 0.4%