Skip to content

Commit

Permalink
feat(lb): deterministic subsetting algorithm to limit the number of i…
Browse files Browse the repository at this point in the history
…nstances
  • Loading branch information
jizhuozhi committed Nov 9, 2023
1 parent 6ac12e2 commit d15c668
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ public ServiceInstanceListSupplier weightedServiceInstanceListSupplier(Configura
.build(context);
}

@Bean
@ConditionalOnBean(DiscoveryClient.class)
@ConditionalOnMissingBean
@Conditional(SubsetConfigurationCondition.class)
public ServiceInstanceListSupplier subsetServiceInstanceListSupplier(ConfigurableApplicationContext context) {
return ServiceInstanceListSupplier.builder().withBlockingDiscoveryClient().withSubset().withCaching()
.build(context);
}

}

@Configuration(proxyBeanMethods = false)
Expand Down

0 comments on commit d15c668

Please sign in to comment.