Dubbo is a distributed service framework that avoids single point of failure (SPOF)
and supports service scale-out. Dubbo supports load balancing. Dubbo distributes call
requests from consumers to prevent a small number of providers from being overloaded.
Some requests time out if providers are overloaded. Therefore, it is necessary to
keep load balancing among providers.
Procedure
- At the top of the page, click the tab.
- In the Query Result section of the tab, click Create on the right.
- In the Create Dynamic Configuration dialog box, set a load balancing rule and click Create.
-
Service Name: in the format of group/service:version
. group
and version
can be left blank. Example: DUBBO/com.alibaba.edas.HelloService:1.0.0
.
-
Application Name: the name of an application created in Enterprise Distributed Application Service
(EDAS).
- Method: the method to which load balancing applies. You can configure a single method or
enter
*
to indicate all methods.
-
Policy: Load balancing supports Random, Round Robin, and Least Active.
-
Random:
Set a random probability based on a weight. The probability of collision on a section
is high. The evenness of call request distribution is proportional to the number of
call requests. Call requests are evenly distributed based on a weighted probability.
This helps dynamically adjust provider weights.
-
RoundRobin:
Set a round robin ratio based on an agreed weight. The round robin algorithm distributes
call requests more evenly than the random probability algorithm. However, slow providers
accumulate call requests. For example, call requests that are distributed to a slow
but functioning instance accumulate and cannot be processed in time.
-
LeastActive:
Call requests are randomly distributed among instances with the same difference in
the number of active requests before and after a call. Slow providers receive fewer
call requests because they have a greater difference in the number of active requests
before and after a call.
Result
After creating a load balancing rule, you can search for, view, modify, and delete
the rule on the Load Balancing page.