Concept
Services find each other by name through a registry such as Eureka or Consul, or through the platform's DNS in Kubernetes, instead of hard-coded hosts. Instances come and go and clients keep working.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Service discovery doing its job.
@Bean
@LoadBalanced
RestClient.Builder restClient() { return RestClient.builder(); }
@Service
class PricingClient {
private final RestClient client;
PricingClient(RestClient.Builder builder) { this.client = builder.baseUrl("http://catalog-service").build(); }
Price priceOf(String sku) {
return client.get().uri("/prices/{sku}", sku).retrieve().body(Price.class);
}
}Running a registry on a platform that already provides discovery. On Kubernetes a Service name is a stable DNS entry; adding Eureka on top duplicates it and adds a component that can fail.
Your roadmap puts these before Service discovery, unless you already know them.
Once a session shows you understand Service discovery, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.