kitex

package module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 0 Imported by: 12

README

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
  • 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.

Documentation

Index

Constants

View Source
const (
	Name    = "Kitex"
	Version = "v0.0.6"
)

Name and Version info of this framework, used for statistics and debug

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package client contains core part of Kitex client.
Package client contains core part of Kitex client.
callopt
Package callopt contains options that control the behavior of client on request level.
Package callopt contains options that control the behavior of client on request level.
genericclient
Package genericclient ...
Package genericclient ...
client
Package client defines the Options of client
Package client defines the Options of client
configutil
Package configutil .
Package configutil .
mocks
Package mocks contains mocks of interfaces.
Package mocks contains mocks of interfaces.
server
Package server defines the Options of server
Package server defines the Options of server
pkg
acl
Package acl implements ACL functionality.
Package acl implements ACL functionality.
circuitbreak
Package circuitbreak implements the circuit breaker logic.
Package circuitbreak implements the circuit breaker logic.
diagnosis
Package diagnosis provide support to register probe func that can get some infos to do diagnosis.
Package diagnosis provide support to register probe func that can get some infos to do diagnosis.
discovery
Package discovery defines interfaces for service discovery.
Package discovery defines interfaces for service discovery.
exception
Package exception is deprecated
Package exception is deprecated
generic
Package generic ...
Package generic ...
generic/binary_test
Package test ...
Package test ...
generic/descriptor
Package descriptor the idl descriptor for describe the idls with golang
Package descriptor the idl descriptor for describe the idls with golang
generic/json_test
Package test ...
Package test ...
generic/map_test
Package test ...
Package test ...
generic/thrift
Package thrift provides thrift idl parser and codec for generic call
Package thrift provides thrift idl parser and codec for generic call
http
Package http is used to implement RPC over HTTP.
Package http is used to implement RPC over HTTP.
loadbalance/lbcache
Package lbcache combine balancer with reslover and cache the resolve result
Package lbcache combine balancer with reslover and cache the resolve result
protocol/bthrift
Package bthrift .
Package bthrift .
registry
Package registry is the API definition of service registry.
Package registry is the API definition of service registry.
remote
Package remote defines all interfaces that are used to do transport with peer side and contains default extension implementations.
Package remote defines all interfaces that are used to do transport with peer side and contains default extension implementations.
remote/connpool
Package connpool provide short connection and long connection pool.
Package connpool provide short connection and long connection pool.
remote/remotecli
Package remotecli for remote client
Package remotecli for remote client
remote/trans/detection
Package detection protocol detection
Package detection protocol detection
remote/trans/invoke
Package invoke .
Package invoke .
remote/trans/netpoll
Package netpoll contains server and client implementation for netpoll.
Package netpoll contains server and client implementation for netpoll.
remote/trans/nphttp2
Package nphttp2 transport powered by netpoll
Package nphttp2 transport powered by netpoll
remote/trans/nphttp2/codes
Package codes defines the canonical error codes used by gRPC.
Package codes defines the canonical error codes used by gRPC.
remote/trans/nphttp2/grpc
Package grpc defines and implements message oriented communication channel to complete various transactions (e.g., an RPC).
Package grpc defines and implements message oriented communication channel to complete various transactions (e.g., an RPC).
remote/trans/nphttp2/metadata
Package metadata define the structure of the metadata supported by gRPC library.
Package metadata define the structure of the metadata supported by gRPC library.
remote/trans/nphttp2/status
Package status implements errors returned by gRPC.
Package status implements errors returned by gRPC.
remote/transmeta
Package transmeta .
Package transmeta .
retry
Package retry implements rpc retry
Package retry implements rpc retry
rpctimeout
Package rpctimeout implements logic for timeout controlling.
Package rpctimeout implements logic for timeout controlling.
streaming
Package streaming interface
Package streaming interface
transmeta
Package transmeta metadata handler for translation
Package transmeta metadata handler for translation
utils
Package utils contains utils.
Package utils contains utils.
Package server defines the Options of server Package server .
Package server defines the Options of server Package server .
genericserver
Package genericserver ...
Package genericserver ...
tool
internal/pkg/generator
Package generator .
Package generator .
internal/pkg/tpl
Package tpl .
Package tpl .
Package transport provides predefined transport protocol.
Package transport provides predefined transport protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL