Discovery Service/Eureka Server

port: 8761, service without tests

Eureka Server is also known as Discovery Server. Eureka Server is an application that holds information about all client-service applications. Every Microservice will register into the Eureka server and the Eureka server knows all the client applications running on each port and IP address. It deals with load balancing and can store a service when it has 2 instances up while working on two different ports. For example, a bank payment service may require many requests to receive information at a given time. Therefore, the dual-port for specific service deals with it and send the requests in accordance.

Eureka Server comes with the bundle of Spring Cloud. For this, we need to develop the Eureka server and run it on the default port 8761. The @EnableEurekaServer annotation used to make your Spring Boot application acts as a Eureka Server.

To include Eureka Server in your project, use the starter with a group ID of org.springframework.cloud and an artifact ID of spring-cloud-starter-netflix-eureka-server

implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'

Securing The Eureka Server

You can secure your Eureka server simply by adding Spring Security to your server’s classpath via spring-boot-starter-security

Last updated

Was this helpful?