Spring Cloud Euraka Server

Görkem AYKAÇ
2 min readSep 1, 2022

--

Euraka server is one of the most needed libraries of Spring Cloud ecosystem. Generally microservices project uses this library. Euraka Server has to many features but generally we use it for the communication between microservices and it is provide load balancing. Firstly we will create a euraka server then we will register microservices to euraka server with euraka client.

1. How should create Euraka Server?

1.1. We have to add euraka server dependency to related pom.xml

1.2. We have to add some annotations to related main class

1.3. We have to create application.yml file like this:

2. How should create Euraka Server?

2.1. We have to add euraka client dependency to related pom.xml

If we add this dependency to pom.xml, the microservices try to find the euraka server, so we have to add euraka server information to yml file.

2.2. We have to create applicationyml like this:

Its done. If we run euraka server then micro service, it will connect. How it looks after connection?

You can see service instances here. If you add more instance of your services, eureka load balancer will do it automatically.

As I said most needed feature of euraka server is communication between microservices. How can we do that?

3. How Do MicroServices Communicate With Each Other with Euraka?

The key is RestTemplate.

After working on some cloud libraries, we will create a combined project with the best Spring Cloud library.

--

--

No responses yet