Giter Site home page Giter Site logo

z406404887 / grpcx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pigogo/grpcx

0.0 1.0 0.0 1.01 MB

gRPCX is a fast and low latency rpc framework suitable for distribution system which implementing most of but not only gRPC interface and much more efficiency,low memory usage than grpc.

License: Apache License 2.0

Makefile 0.01% Go 98.72% Shell 1.27%

grpcx's Introduction

grpcx

gRPCX 是一个复用了大部分gRPC接口并对其做了个性化扩展的rpc框架,传输调度相关代码大部分已经重新;之所以开发这个框架,是希望能改善gRPC框架的性能和内存问题,同时对分布式系统做更好的个性化支持.gRPCX对传输层做了改动,目前没有支持http2,可以指定支持tcp,unix,quic等.

框架特征

  • 增加通道的支持:在分布式系统中,经常有时序要求的请求,在框架中增加通道显得非常重要。gRPCX采用的是动态通道算法,非固定的静态通道,增加数据公平竞争性;同时也对通道并发数做了控制
  • 增加连接事件插件:通过option指定plugin
  • 增加单向请求的支持
  • 增加自定义RawHandler和Struct作为service的注册机制
  • 增加框架内的PING/PONG健康监测选项
  • 增加服务端的通知:即支持Server端SentTo到客户端
  • 增加异步请求支持
  • 增加业务层对Metadata的获取支持
  • 增加客户端失败重试的机制
  • 支持rpc流,同gRPC,需将pb内引用gRPC的地方改成引用gRPCX
  • 支持多种编码:默认使用pb,可通过option自定义,同gRPC
  • 支持压缩:支持gzip压缩,同gRPC
  • 支持加密授权:支持tls,同gRPC
  • 支持并发控制:可通过option设置通道的并发数和请求数的并发数;gRPC采用的是流量控制
  • 支持Graceful关闭:同gRPC
  • 负载均衡:提供option扩展,当前支持Roundroubin方法,计划支持hash和一致性hash等,选择性支持居于最少请求,最少连接,ping,最快响应等动态负载均衡算法
  • 服务发现:提供option扩展,支持zk和etcd
  • 去除了gRPC一些不常用的功能,例如请求劫持,reflection,state,trace等

关于性能

  • 多连接并行请求,性能比grpc提升约50%~60%
  • 单连接串行请求,性能比grpc提升约100%
  • 多连接串行请求,性能比grpc提升约150%

grpcx's People

Contributors

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