com.netflix.loadbalancer.RandomRule Java Examples

The following examples show how to use com.netflix.loadbalancer.RandomRule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EurekaRibbonConfig.java    From fw-spring-cloud with Apache License 2.0 5 votes vote down vote up
@Bean
public IRule ribbonRule() {

    //默认ZoneAvoidanceRule请求,实现自定义的规则
    //自定义成随机

    return new RandomRule();
}
 
Example #2
Source File: RestConfiguration.java    From spring-boot-demo with MIT License 4 votes vote down vote up
/**
 * 随机选取负载均衡策略
 * @return
 */
@Bean
public IRule testRule() {
    return new RandomRule();
}
 
Example #3
Source File: EurekaRibbonConfig.java    From fw-spring-cloud with Apache License 2.0 4 votes vote down vote up
@Bean
public IRule ribbonRule() {
    //自定义成随机
    return new RandomRule();
}
 
Example #4
Source File: RibbonConfiguration.java    From springcloud-study with Apache License 2.0 4 votes vote down vote up
@Bean
 public IRule ribbonRule(){
     //随机负载
     return new RandomRule();
}
 
Example #5
Source File: RibbonTimeConfig.java    From Spring with Apache License 2.0 4 votes vote down vote up
@Bean
public IRule ribbonRule(){
	return new RandomRule();
}
 
Example #6
Source File: RibbonApplication.java    From micro-service with Apache License 2.0 4 votes vote down vote up
@Bean
public IRule ribbonRule() {
    return new RandomRule();
}
 
Example #7
Source File: RibbonConfiguration.java    From spring-cloud-docker-microservice-book-code with Apache License 2.0 4 votes vote down vote up
@Bean
public IRule ribbonRule() {
  // 负载均衡规则,改为随机
  return new RandomRule();
}
 
Example #8
Source File: RibbonConfiguration.java    From code-examples with MIT License 4 votes vote down vote up
@Bean
public IRule ribbonRule(IClientConfig config) {
	return new RandomRule();
}
 
Example #9
Source File: RibbonConfiguration.java    From spring-cloud-docker-microservice-book-code with Apache License 2.0 4 votes vote down vote up
@Bean
public IRule ribbonRule() {
  // 负载均衡规则,改为随机
  return new RandomRule();
}