Coder Social home page Coder Social logo

kitex's Introduction

CloudWeGo-Kitex

Kitex 字节跳动内部的 Golang 微服务 RPC 框架,具有高性能强可扩展的特点,针对字节内部做了定制扩展。如今越来越多的微服务选择使用 Golang,我们考虑将 Kitex 开源出来丰富开源社区。如果对微服务性能有要求,又希望定制扩展融入自己的治理体系,Kitex 会是一个不错的选择。

框架特点

  • 高性能

    使用自研的高性能网络库 Netpoll,性能相较 go net 具有显著优势。

  • 扩展性

    提供了较多的扩展接口以及默认扩展实现,使用者也可以根据需要自行定制扩展,具体见下面的框架扩展。

  • 多消息协议

    RPC 消息协议默认支持 ThriftKitex ProtobufgRPC。Thrift 支持 Buffered 和 Framed 二进制协议;Kitex Protobuf 是 Kitex 自定义的 Protobuf 消息协议,协议格式类似 Thrift;gRPC 是对 gRPC 消息协议的支持,可以与 gRPC 互通。除此之外,使用者也可以扩展自己的消息协议。

  • 多传输协议

    传输协议封装消息协议进行 RPC 互通,传输协议可以额外透传元信息,用于服务治理,Kitex 支持的传输协议有 TTHeaderHTTP2。TTHeader 可以和 Thrift、Kitex Protobuf 结合使用;HTTP2 目前主要是结合 gRPC 协议使用,后续也会支持 Thrift。

  • 多交互方式

    支持 PingPongOneway双向 Streaming。其中 Oneway 目前只对 Thrift 协议支持,双向 Streaming 只对 gRPC 支持,后续会考虑支持 Thrift 的双向 Streaming。

  • 服务治理

    支持服务注册/发现、负载均衡、熔断、限流、重试、监控、链路跟踪、日志、诊断等服务治理模块,大部分均已提供默认扩展,使用者可选择集成。

  • 代码生成

    Kitex 内置代码生成工具,可支持生成 ThriftProtobuf 以及脚手架代码。

框架性能

性能测试只能提供相对参考,工业场景下,有诸多因素可以影响实际的性能表现。

由于开源社区缺少支持 thrift 的优秀 RPC 框架,当前对比项目为 grpc, rpcx, 均使用 protobuf 协议。

我们通过 测试代码 比较了它们的性能,测试表明 Kitex 具有明显优势。

测试环境

  • 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

并发表现 (Echo 1KB, 改变并发量)

QPS TP99 TP999
image image image

吞吐表现 (并发 100, 改变包大小)

QPS TP99 TP999
image image image

详细文档

相关项目

  • Netpoll: 自研的高性能网络库,Kitex 默认集成的。
  • kitex-contrib:Kitex 的部分扩展库,使用者可以根据需求通过 Option 集成进 Kitex 中。
  • Example:Kitex 的使用示例。

相关文章

贡献代码

Contributing

开源许可

Kitex 基于Apache License 2.0 许可证,其依赖的三方组件的开源许可见 Licenses

联系我们

kitex's People

Contributors

bengol avatar hchenn avatar huangxuny1 avatar joway avatar kesonan avatar lsjbd avatar purewhitewu avatar rleungx avatar simon0-o avatar yangruiemma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.