SEARCH BY

All

  • All
  • Java8
  • Spring

Complete guide to Eureka Server and Client for developing spring boot microservice application

Post a Comment

What is Eureka

Eureka is developed by Netflix which has two key parts in it, one is service registry( naming ) & discovery and another is service client, Service registry called as Eureka server and service client called as Eureka client. Each service client must be resisted with Eureka server. Eureka is useful to develop microservice application. Click her to read more about monolithic and microservice applications. 

What is Eureka Server

Eureka Server is a java based application which used as services registry( naming ) & discovery in microservices application. Now here there are two buzz words one is what is service and what is microservice. To understand about microserivces architecture in detailed read this article. Netflix created this Eureka Server to use in their applications and latter it is released to the public as a opensource.
Following are simple definitions of service and microservices
Service: service is a individual application component in complete microservice application
MicroService: is a bundle of independent applications/services
Eureka Server can be also called as naming & discovery server for middle tier servers and microservice components. Eureka server is different than DNS naming servers which are used to map domain with ip adress. For example www.domainsite.com will be mapped to an ip address 192.5.3.1 by DNS naming servers, but Eureka server is naming server for middle-tier services which are part of microservice application.

When we can use Eureka server?

  • We can use eureka server to develop microservice applications
  • If we want client side load balancing then we can use eureka server
  • If we want to use simple round-robbin load balance then we can use eureka server
  • If we want to load cache data into external cache services like memcached 
  • If we need an alternative for AWS ELB

What Eureka server can do?

Eureka server acts as a client naming server and client discovery server. Each individual component of a microservice application can be registered with a name, with the registered name of a client eureka server can allow us to communicate with the client. For better understanding consider there are two services customer and invoice. Then if customer service wants to talk ( connect ) with invoice service, then customer service talks with Eureka server to get the instance of invoice service, this process called as service discovery, that means providing instance of service to another registered service called as service registry.
Naming is different than discovery, naming gives unique name to the service and discovery is the process to provide instance of a service to required service.

What is a Eureka Client

Eureka client is a regular spring boot application performs some part of business logic in a overall functioning of application. For example in ERP based application customer, Purchase order, invoice, products, inventory are some examples as eureka clients. 
Eureka client also can be applications to provide additional configurations to overall functioning of microservice application, for example central config server, API gateway server also can be called as eureka clients. 

Spring Cloud Netflix

Spring comes with a simple configurations process to develop Eureka server and client based microservice applications. Spring Cloud Netflix provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few simple annotations you can quickly enable and configure the common patterns inside your application and build large distributed systems with battle-tested Netflix components. The patterns provided include Service Discovery (Eureka), Circuit Breaker (Hystrix), Intelligent Routing (Zuul), REST Client (Feign) and Client Side Load Balancing (Ribbon).
jaya
I love software designing, coding, writing and teaching...

Share this article

Related Posts

Post a Comment

Place your code in <em> </em> tags to send in comments | Do not add hyper links in commnet

Close

Subscribe our newsletter for the latest articles directly into your email inbox