iluwatar/java-design-patterns

Microservice pattern: Client-side service discovery

iluwatar opened this issue · 8 comments

Description:
The Client-Side Service Discovery pattern is a design strategy in microservice architectures where the client is responsible for determining the network location of service instances. This involves querying a service registry, which keeps track of available service instances. The client retrieves the required information and selects an appropriate service instance to communicate with.

Main elements of the pattern include:

  • Service Registry: A centralized database that maintains the addresses of service instances.
  • Service Registration: Services register their network locations (IP addresses and port numbers) with the service registry.
  • Service Querying: Clients query the service registry to get the location of a service instance.
  • Load Balancing: Clients implement load balancing strategies to choose among multiple service instances.

References:

  1. Microservices Patterns
  2. Spring Cloud Netflix Eureka
  3. Project Contribution Guidelines

Acceptance Criteria:

  1. Implement a service registry that can register and deregister service instances.
  2. Create a client module that can query the service registry to discover service instances.
  3. Ensure that the client module includes a basic load-balancing mechanism to distribute requests among multiple service instances.

hello am from MLHhackathon open soucre week. can you assign me this

thanks for this, am jumping on it right away

I want to ask if can i use Spring Boot to implement the pattern as specified in the documentation just to be sure am on track. thanks

Yes, Spring Boot is perfectly fine. It has been used in some of the other patterns as well.

Hello, I just completed the task assigned to me. How do you suggest I create a PR because each microservices has its own folder? e.g. service-registry has its own folder directory, likewise the rest of the microservices I created. I was thinking if I could add all the microservice folders in a single folder, initialize git, and add a readme.Md file along with it and create a PR. I don't know if this suggestion is okay. please let me know which to follow. thanks

I think we could follow the approach taken in aggregator-microservices, see https://github.com/iluwatar/java-design-patterns/tree/master/aggregator-microservices

Good day, @iluwatar. I hope you are doing well. Is there any article or guide I can follow on configuring the microservice parent pom.xml since I am following a similar pattern?[https://github.com/iluwatar/java-design-patterns/tree/master/aggregator-microservices]. I could configure it but could not run it on my laptop. thanks

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.