6 On service discovery

This chapter covers

  • Why service discovery is important to cloud-based applications
  • The pros and cons of service discovery vs. the Load Balancer
  • Setting up a Spring Netflix Eureka Server
  • Registering a Spring Boot microservice with Eureka
  • Using the Spring Cloud Load Balancer library for client-side load balancing

In any distributed architecture, we need to find the hostname or IP address of where a machine is located. This concept has been around since the beginning of distributed computing and is known formally as “service discovery.” Service discovery can be something as simple as maintaining a property file with the addresses of all the remote services used by an application, or something as formalized as a Universal ...

Get Spring Microservices in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.