In the tutorial microservice-registration-and-discovery-with-spring-cloud-and-netflix-s-eureka a REST request is made the bookmark-service
like this:
// use the "smart" Eureka-aware RestTemplate
ResponseEntity<List<Bookmark>> exchange =
this.restTemplate.exchange(
"http://bookmark-service/{userId}/bookmarks",
HttpMethod.GET,
null,
new ParameterizedTypeReference<List<Bookmark>>() {
},
(Object) "mstine");
exchange.getBody().forEach(System.out::println);
Suppose half the userid
instances are on one server and the other half are on another server. Does the DiscoveryClient support figuring out which bookmark-service
server to query for the provided userid
?