java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

Service Registry pattern

Open npathai opened this issue 9 years ago • 11 comments

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 avatar Feb 16 '16 09:02 npathai

@npathai @iluwatar I am working on this pattern. Please add under construction tag to this issue. Thanks.

Aravamudhan avatar Mar 01 '16 04:03 Aravamudhan

@Aravamudhan Sure. I would suggest you to discuss the approach. We may need some microservice toolkit for this.

npathai avatar Mar 01 '16 06:03 npathai

@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 avatar Mar 01 '16 17:03 Aravamudhan

@Aravamudhan Yes that would be fine :+1: I haven't used Sprint Boot personally though.

npathai avatar Mar 02 '16 08:03 npathai

@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 avatar Mar 02 '16 09:03 Aravamudhan

@Aravamudhan are you still working on this?

iluwatar avatar Jul 14 '16 09:07 iluwatar

@iluwatar I apologize for not informing before. No I am not currently working on this pattern.

Aravamudhan avatar Jul 14 '16 13:07 Aravamudhan

It's ok. I'll change the labels to indicate this issue is free for taking again.

iluwatar avatar Jul 14 '16 16:07 iluwatar

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/

javatlacati avatar Apr 19 '22 13:04 javatlacati

HI @iluwatar, please let me know if I can work on the above PR. I would like to contribute here.

ved-asole avatar Sep 14 '23 04:09 ved-asole

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.

stale[bot] avatar Nov 16 '23 16:11 stale[bot]