Service Registry using Spring Cloud & Netflix Eureka

Usha Devasi
2 min readApr 10, 2020

--

Microservice styled architecture is basically needed to make no. of services written in the different programming languages to interact with each other, being more reliable and failure-tolerant.

What to expect out of this article?

  • How to configure Eureka with Spring Cloud
  • Check, up and running Eureka server with and without any client configured with it.
  • Configure Eureka Client service on Eureka Server

Installing Eureka on Server Side:

  1. Add org.springframework.boot:spring-cloud-starter-eureka-server on your classpath.

e.g. In Pom.xml :

pom.xml

2. Add @EnableEurekaServer in Application.java

Application.java

3. In application.yml :

application.yml

Run your Application

These are the steps to Configure Eureka Server Side and then Check out the localhost link : http://localhost:{port}/{application name} ,

Eureka server with no Application Instance

Deploying Eureka client

  1. Add org.springframework.boot:spring-cloud-starter-eureka-client on your classpath.

e.g. In Pom.xml :

pom.xml

2. Add @EnableEurekaClient in Application.java OR @EnableDiscoveryClient can also be used. @EnableDiscoveryClient will work for any other Service registry.

3. In application.yml :

Run your Application

Now, let’s see how Eureka Server Side look when Eureka client is configured with it. Check out the localhost link : http://localhost:{port}/{application name},

This way we can configure and register all the services with Netflix Eureka.

--

--

Usha Devasi
Usha Devasi

Written by Usha Devasi

Tech Lead/ Engineering Manager, Mentor, Coach, Certified Professional Scrum Master and SomeOne who is Passionate about Learning and exploring.

No responses yet