Service Registry using Spring Cloud & Netflix Eureka
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:
- Add org.springframework.boot:spring-cloud-starter-eureka-server on your classpath.
e.g. In Pom.xml :
2. Add @EnableEurekaServer in Application.java
3. In 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} ,
Deploying Eureka client
- Add org.springframework.boot:spring-cloud-starter-eureka-client on your classpath.
e.g. In 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.