Interview Series 16 dubbo cluster fault tolerance and load balancing policy strategy what are? Dynamic proxy policy it

(1) dubbo load balancing strategy

 

1)random loadbalance

 

By default, dubbo is random load balance random call load balancing can be set for different instances provider different weights, will follow weights load balancing, the larger the weight distribution the higher the flow, generally use this default on it.

 

2)roundrobin loadbalance

 

There roundrobin loadbalance, this is the default if the flow evenly to hit up each machine, but if the performance of each machine is different, easily lead to poor performance of the machine load is too high. So in this case you need to adjust the weights so that the machine carrying heavy weights poor performance of smaller, less traffic number.

 

Students apply for machines with operation and maintenance, sometimes we're lucky, just more adequate resources company, just a group of steaming hot, just make a batch of freshly baked virtual machine configuration are high. 8-core + 16g, the machine 2. After some time, I feel a little two machines is not enough, I went to operation and maintenance classmates, buddies, can you give me one machine, 4-core + 8G machine. I still have to.

 

3)leastactive loadbalance

 

This is the automatic perception that, if a worse performance machine, so fewer requests received, the less active, inactive at this time will give the poor performance of the machine less request

 

4)consistanthash loadbalance

 

Hash algorithm consistency, the same parameters must request a provider to distribute up, provider hang time, will evenly distribute the remaining flow based on virtual node, the jitter will not be much. If you need is not random load balancing, to a class of requests to a node, it would go this consistency hash strategy.

 

(2) dubbo fault-tolerant cluster strategy

 

1) failover cluster mode

 

Failure automatic switching, automatic retry the other machine, the default is that this is common in the read operation

 

2) failfast cluster mode

A failure to immediately call failure, common in the write operation

 

3) failsafe cluster mode

 

Ignored when an exception occurs, commonly used in the interface call is not important, such as logging

 

4) failbackc cluster mode

 

Background automatic recording request failed, then the retransmission timer, the message queue more suitable for such a write

 

5)forking cluster

 

Parallel call multiple provider, as long as a successful return immediately

 

6)broadcacst cluster

 

Call one by one all the provider

 

(3) dubbo dynamic proxy policy

 

Default javassist bytecode generated dynamically created proxy class

 

But you can configure your own dynamic proxy policy extension mechanism by spi

Guess you like

Origin www.cnblogs.com/xiufengchen/p/11258976.html