The difference between remote calling Dubbo and Feign

1. Similarities

Both Dubbo and Feign rely on registry and load balancing.
Two, the difference

1. Agreement

Dubbo:

支持多传输协议(Dubbo、Rmi、http、redis等等),可以根据业务场景选择最佳的方式。非常灵活。
默认的Dubbo协议:利用Netty,TCP传输,单一、异步、长连接,适合数据量小、高并发和服务提供者远远少于消费者的场景。

Feign:

Based on Http transmission protocol, short connection, not suitable for high concurrent access.

2. Load balancing

Dubbo:

支持4种算法(随机、轮询、活跃度、Hash一致性),而且算法里面引入权重的概念。
配置的形式不仅支持代码配置,还支持Dubbo控制台灵活动态配置。
负载均衡的算法可以精准到某个服务接口的某个方法。

Feign:

只支持N种策略:轮询、随机、ResponseTime加权。
负载均衡算法是Client级别的。

3. Fault tolerance strategy

Dubbo:

Support a variety of fault tolerance strategies: failover, failfast, brodecast, fork, etc., and also introduce configuration parameters such as retry times and timeout.

Feign:

Using the fuse mechanism to achieve fault tolerance, the processing method is different.

Guess you like

Origin blog.csdn.net/qq_36073688/article/details/113196429
Recommended