dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.9k stars 2.06k forks source link

dubbox thrift协议跨语言问题 #313

Open lee-icon opened 7 years ago

lee-icon commented 7 years ago

发布的thrift协议的服务端,如果通过php客户端走thrfit协议调用会经过注册中心吗?

yunhaibin commented 7 years ago

php客户端的消费者不会注册到注册中心,应该是直连提供者,没有走注册中心也没有负载均衡机制和容灾机制了,不过可以自己在消费者和提供者之间实现负载和容灾

lee-icon commented 7 years ago

@yunhaibin 哦哦,了解了.也就是在php端也要提供一套负载和容灾机制,使java端和php端使用同一个zk集群,可以这样理解吗?

yunhaibin commented 7 years ago

想做到php消费端也注册到zk和dubbo一起使用感觉比较复杂,开发量不小,建议php消费者使用rest方式调用提供者,提供者提供rest方式的服务,这样可以在dubbo提供者上层加nginx来做软负载和容灾,nginx的容灾可以使用lvs

lee-icon commented 7 years ago

@yunhaibin 好的 了解了,谢谢您了.公司提出使用zk+thrift做分布式的方案,但是能力,时间有限,所以想参考dubbo,通过dubbo走thrift协议来实现. 看来如果跨语言的话还是没达到理想目标.这么看rest是个很好的解决方案.十分感谢您的解答:)

yunhaibin commented 7 years ago

不客气,rest+http在跨语言场景我觉得还是首选,json的传输量也不是很大,开发效率也高,性能在大部分场景还是完全可以接受的

kimmking commented 7 years ago

异构环境下走zk,保持状态是个问题。