The service provider must be started first, otherwise an error will be reported

  1. Start check (the default properties of Dubbo) in the process of service start to verify the usability of the service provider, the validation process problems can prevent the spring container initialization, as far as possible don’t close the service start check let us as early as possible to find service problems, but not all of the service not to close inspection, For some services that are strongly dependent on each other, service checking can be turned off. After the startup check, it is important to remember to start all services before starting the service. Otherwise, online faults may occur.
@Reference(interfaceClass = UserAPI.class,check = false)
    private UserAPI userAPI;
Copy the code

** A subservice has multiple servers deployed. How can consumers invoke it? Dubbo’s load balancing strategy

Name of strategy Strategy description
Random (dubbo default) Random, according to the weight set random probability
RoundRobin Polling, according to the convention after the weight set polling ratio, a machine is slow easy to cause service avalanche
LeastActive Minimum number of active invocations, the response time of service invocations is calculated, and slower providers receive fewer requests
ConsistentHash Consistent Hash, where requests with the same parameters are always sent to the same provider

protocol

  • Protocol is the communication protocol between services, as shown below. Name is the protocol name and port is the port number of the protocol. Dubbo supports a variety of protocols: HTTP, Hessian, Redis, etc. The most common is Dubbo.