A service registry is a phone book for your microservices. Each service registers itself with the service registry and tells the registry where it lives (host, port, node name).
When we start a project, we add all the configuration in the properties file. As more and more services are developed and deployed, adding and managing these properties become more complex. Some services might go down, while for some the location might change. This manual changing of properties may create issues.
Service Registration and Discovery helps in such scenarios. There are several popular options for service registeries.
I’ll focus on Eureka in this post because it is implemented on the JVM and can be bootstrapped automatically in one of Spring Cloud’s auto-configurations. As all services are registered to the Eureka server and lookup done by calling the Eureka server, any change in service locations need not be handled and is taken care of.
This article is first among a series of 5 articles:
Part 3 - Use Eureka for Service Registration
Part 4 - Use Eureka for Service Discovery
Overview of Netflix components
Netflix OSS is a set of frameworks and libraries that Netflix wrote to solve some interesting distributed-systems problems at scale. The patterns include Service Discovery (Eureka), Circuit Breaker (Hystrix), Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).
|Netflix Component Name||Functionality|
|Eureka||Service Registration and Discovery|
|Ribbon||Dynamic Routing and Load Balancer|
In the next part of this tutorial, we will develop two spring boot projects: student producer and student consumer and further we will register these services with Eureka and apply load balancing using Ribbon.