Spring Cloud: Service Discovery With Eureka

Learn the fundamentals of Service Discovery and Spring Cloud Eureka with code examples.

Sarindu Udagepala
The Startup

--

One of the main building blocks of a micro-service architecture is service discovery. Spring cloud provides multiple solutions such as Eureka, Zookeeper, Cloud Foundry and Consul to facilitate the process of service discovery. This piece is aimed at providing you a simple explanation of service discovery with Eureka. I will be covering the following topics in this article.

  • What is Service Discovery?
  • What is Spring Cloud Eureka?
  • Implementing a Eureka Server and a Client
  • Inter-Microservice Communication via Eureka
  • Understanding Eureka Client-Server Communication

What is Service Discovery?

A distributed system typically comprises a large number of services which communicate with each other to perform certain operations. Service discovery is the process of one service dynamically discovering the network location (IP address and port) of another service to communicate with it.

Imagine a scenario in which one REST service (Service A) is trying to invoke another REST service (Service B). In order to make a request…

--

--

Sarindu Udagepala
The Startup

I’m a technical lead at WSO2, blogger, son, husband and father. Passionate about technology and learning.