Load Balancing Policy
Abstractloadbalancerrule
An abstract class of load balancing policies that defines a load Balancer Iloadbalancer object that can be obtained when a service policy is selected for a specific implementation
Some of the information maintained in load balancing as a basis for allocation and design algorithms to implement efficient strategies for specific scenarios
Randomrule
Randomly select a service instance
Roundrobinrule
How to poll linearly
Retryrule
Implements an instance selection function with retry mechanism
Weightedresponsetimerule
This strategy is an extension of the roundrobinrule, which increases the calculation of weights based on the operation of the instance, and selects instances based on weights to achieve better allocation results.
Scheduled Tasks
Serverweighttimer.schedule (New Dynamicserverweighttask (), 0, Serverweighttasktimerinterval); Start a scheduled task,
Used to calculate weights for each service instance
Spring Cloud Ribbon Client load Balancing policy