Article From:https://www.cnblogs.com/jinjian91/p/9277892.html

The company uses Dubbo as the RPC framework. It is necessary to learn briefly (build it yourself) and make the learning record.

dubboUnderstanding: Dubbo is a RPC service governance framework for distributed SOA (service-oriented) architecture. It can be compatible with various RPC, strong places are mainly used for service governance. Ali provides maintenance updates at present.

Service governance: load balancing and cluster fault tolerance mechanisms.

Project building part:

Environment: three virtual machines zookeeper boot, idea, maven, Tomcat

Project Description: official introduction of a simple introductory tutorial, the official reason for the use of tomcat, I think on the one hand out of simplicity, on the other hand, because the RPC is based on the netty container (TCP level), do not need to rely on the servlet container.

Add Tomcat to waste.

As a whole, it is still relatively simple. Here, zookeeper is chosen as the registration center.

(sh zkCli.sh timeout 5000 -server ip port   You can use this command to view nodes, and note the size of timeout time. Otherwise, you may not be able to link up, and the default time is relatively small.

This way, it feels very difficult to describe and put the links directly.

provider:http://git.gupaoedu.com/jinjian/dubboProvider

consumer:http://git.gupaoedu.com/jinjian/dubboConsumer

 Load balance: LoadBalance

1.Random(Random designation of a provid); 2.RoundRobin (weight polling); 3.LeastActive (minimum activity, priority of fast service performance); 4ConsistentHash (unanimous hash, invoking the same machine with the same parameters);

Cluster fault tolerant strategy:

1.Failover Cluster(Failure automatic switching, combined with retries); 2, Failfast (fast failure, the end of a single failure); 3Failsafe (failure security), 4Failback (failure recovery time retransmission), 5.Forking (parallel, one into one)Work is returned) 6.Broadcast (one by one, one report is returned).

Supplement:If you want to implement soft load balancing in the project and specify a machine to execute, each Tomcat can be used as provider. In this way, the caller can be implemented using Dubbo as a consumer!

For load and fault tolerance details, reference blog: https://blog.csdn.net/songjinbin/article/details/49455515

The basic knowledge about Dubbo can be referred to as follows:

https://www.cnblogs.com/linlinismine/p/7814521.html

https://blog.csdn.net/libo2158/article/details/79365991

 

Similar Posts:

Link of this Article: Dubbo build and use notes

Leave a Reply

Your email address will not be published. Required fields are marked *