← All tutorials

GoCareerGo Tutorials

Spring Boot Tutorial

Auto-configuration, REST APIs, JPA, AOP, caching, microservices and Spring Cloud.

Service Discovery with Eureka

Eureka is a service registry — services register themselves on startup, and other services look them up by name instead of hardcoded URLs.

# application.properties on a client service
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/
spring.application.name=order-service
  • Eureka Server — the registry itself, run as its own Spring Boot app
  • Eureka Client — any service that registers with the server
  • Combined with a load balancer, this enables client-side load balancing across instances