Skip to content

Rpc与http #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
WeihanLi opened this issue Jun 8, 2018 · 0 comments
Open

Rpc与http #8

WeihanLi opened this issue Jun 8, 2018 · 0 comments

Comments

@WeihanLi
Copy link
Owner

WeihanLi commented Jun 8, 2018

成熟的rpc库相对http容器,跟多的是封装了“服务发现”,"错误重试"一类面向服务的高级特性。可以这么理解,rpc框架是面向服务的更高级的封装。如果把一个http server容器上封装一层服务发现和函数代理调用,那它就已经可以做一个rpc框架了。

RPC是系统间的一种通信方式,系统间常用的通信方式还有http,webservice,rpc等,一般来讲rpc比http和webservice性能高一些,常见的RPC框架有:thrift,Finagle,dubbo,grpc,json-rpc等。一个通用的网络RPC框架,它应该包括如下功能:1.具有服务的分层设计,借鉴Future/Service/Filter概念2.具有网络的分层设计,区分协议层、数据层、传输层、连接层3.独立的可适配的codec层,可以灵活增加HTTP,Memcache,Redis,MySQL/JDBC,Thrift等协议的支持。4.将多年各种远程调用High availability的经验融入在实现中,如负载均衡,failover,多副本策略,开关降级等。5.通用的远程调用实现,采用async方式来减少业务服务的开销,并通过future分离远程调用与数据流程的关注。6.具有状态查看及统计功能7.当然,最终要的是,具备以下通用的远程容错处理能力,超时、重试、负载均衡、failover……

作者:iseeyou
链接:https://www.zhihu.com/question/25536695/answer/113449098
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Reference

@WeihanLi WeihanLi added arch http and removed arch labels Jun 8, 2018
@WeihanLi WeihanLi added the arch label Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant