Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microservice pattern: Client-side service discovery #2685

Open
iluwatar opened this issue Oct 15, 2023 · 10 comments
Open

Microservice pattern: Client-side service discovery #2685

iluwatar opened this issue Oct 15, 2023 · 10 comments
Assignees
Labels
epic: pattern status: stale issues and pull requests that have not had recent interaction type: feature

Comments

@iluwatar
Copy link
Owner

iluwatar commented Oct 15, 2023

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.
@lokytech5
Copy link

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

@lokytech5
Copy link

thanks for this, am jumping on it right away

@lokytech5
Copy link

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

@iluwatar
Copy link
Owner Author

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

@lokytech5
Copy link

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

@iluwatar
Copy link
Owner Author

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

@lokytech5
Copy link

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

Copy link

stale bot commented Dec 26, 2023

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 stale bot added the status: stale issues and pull requests that have not had recent interaction label Dec 26, 2023
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 24, 2024
@iluwatar iluwatar moved this from In Progress to Todo in Java Design Patterns project Mar 24, 2024
@c99SRS
Copy link

c99SRS commented Oct 1, 2024

Hi @iluwatar can you please assign this to me? I have 9 years of experience in java and backend domains. Please assign this to me

Copy link

stale bot commented Dec 13, 2024

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 stale bot added the status: stale issues and pull requests that have not had recent interaction label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic: pattern status: stale issues and pull requests that have not had recent interaction type: feature
Projects
Status: In Progress
Development

No branches or pull requests

3 participants