0

We are looking to of move to Spring Cloud Load Balancer to replace Ribbon. We use Eureka for service discovery and registration.

It looks like as of Spring Cloud Netflix 3.x, the EurekaRibbonClientConfiguration in the Eureka client module has been removed.

We were using the deploymentContextBasedVipAddress configuration to map our internal host name to a registered vip address in Eureka.

The configuration was similar to this:

some-sevice-v1.ribbon.NIWSServerListClassName=com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
some-sevice-v1.ribbon.DeploymentContextBasedVipAddresses=some_service-v1
some-sevice-v1.ribbon.NIWSServerListFilterClassName=com.netflix.loadbalancer.ServerListSubsetFilter

We do this because the vip address that is registered with Eureka contains an _ in it and which is technically an invalid character for host names; the Java URI class will fail to parse a host with a _ in it. We are not able to change this at this point.

So my question is; can this similar configuration be done with Spring Cloud Load Balancer and the new Eureka client module in Spring Cloud Netflix 3.x, where we can provide aliasing for the vip address?

xenobc
  • 1
  • 1

1 Answers1

0

We have faced the same issue. Currently, we are using the following workaround for our feign clients:

@FeignClient(
    value = "${my.amazing.service.name:amazing-service-name-default}",
    contextId = "amazing-service",
    configuration = AmazingServiceClientConfiguration.class,
    path = "/amazing-service"
)
public interface AmazingServiceClient {
  ...
}

We can configure my.amazing.service.name the same way as DeploymentContextBasedVipAddresses.

There is also an open ticket for this issue: https://github.com/spring-cloud/spring-cloud-commons/issues/951

Hope, this helps.