Skip to content

Microservice pattern: Client-side service discovery #2685

Open

Description

@iluwatar

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.

Activity

  1. converted this from a draft issue on Oct 15, 2023
  2. lokytech5 commented on Oct 16, 2023

    @lokytech5

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

  3. moved this from Todo to In Progress in Java Design Patterns projecton Oct 17, 2023
  4. lokytech5 commented on Oct 17, 2023

    @lokytech5

    thanks for this, am jumping on it right away

  5. lokytech5 commented on Oct 18, 2023

    @lokytech5

    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

  6. iluwatar commented on Oct 22, 2023

    @iluwatar
    OwnerAuthor

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

  7. lokytech5 commented on Oct 22, 2023

    @lokytech5

    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

  8. iluwatar commented on Oct 25, 2023

    @iluwatar
    OwnerAuthor

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

  9. lokytech5 commented on Oct 26, 2023

    @lokytech5

    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

  10. 12 remaining items

  11. moved this from In Progress to Todo in Java Design Patterns projecton Jan 6, 2025
  12. krupaliw commented on Oct 6, 2025

    @krupaliw

    @iluwatar Can you please assign this to me?

  13. moved this from Todo to In Progress in Java Design Patterns projecton Jun 1, 2026
  14. github-actions commented on Aug 1, 2026

    @github-actions

    This issue is stale because it has been open 60 days with no activity.

  15. added and removed
    status: staleissues and pull requests that have not had recent interaction
    on Aug 16, 2026
  16. moved this from In Progress to Todo in Java Design Patterns projecton Aug 16, 2026
  17. vanxa commented on Sep 29, 2026

    @vanxa

    Hi @iluwatar,
    seems like this one is bouncing back and forth. Can I take it and see if I can do it? I've used Eureka extensively in the past and I'd be happy to code what I've used.
    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions