java-design-patterns
java-design-patterns copied to clipboard
Service Registry pattern
This is a microservices pattern http://microservices.io/patterns/service-registry.html
Context
Clients of a service use either Client-side discovery or Server-side discovery to determine the location of a service instance to which to send requests.
Problem
How do clients of a service (in the case of Client-side discovery) and/or routers (in the case of Server-side discovery) know about the available instances of a service?
Forces
Each instance of a service exposes a remote API such as HTTP/REST, or Thrift etc. at a particular location (host and port) The number of services instances and their locations changes dynamically. Virtual machines and containers are usually assigned a dynamic IP address. An EC2 Autoscaling Group, for example, adjusts the number of instances based on load.
@npathai @iluwatar I am working on this pattern. Please add under construction tag to this issue. Thanks.
@Aravamudhan Sure. I would suggest you to discuss the approach. We may need some microservice toolkit for this.
@npathai We can use Spring boot. I deployed the app in my machine. It worked quite well. Please let me know if that is fine.
@Aravamudhan Yes that would be fine :+1: I haven't used Sprint Boot personally though.
@npathai Even I never used it before. Recently came across it. It makes creating apps and deploying them extremely simple. Since in this pattern we need to deploy few apps, by using Spring boot, we do not even need a server or db connection for deploying the applications we create.
@Aravamudhan are you still working on this?
@iluwatar I apologize for not informing before. No I am not currently working on this pattern.
It's ok. I'll change the labels to indicate this issue is free for taking again.
I knew this as Service Discovery, and the service registry as a part of it. https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/
HI @iluwatar, please let me know if I can work on the above PR. I would like to contribute here.
This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.