iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
90.07k stars 26.61k forks source link

Microservice pattern: Server-side service discovery #2686

Open iluwatar opened 1 year ago

iluwatar commented 1 year ago

Description

Implement the Server-Side Service Discovery design pattern for the project. This pattern helps in dynamically locating services within a microservices architecture, enhancing the system's scalability and flexibility.

Main Elements of the Pattern:

  1. Service Registry: A central repository that holds the network locations of service instances.
  2. Service Provider: Services register their instances with the service registry.
  3. Service Consumer: Consumers query the service registry to find available service instances.
  4. Load Balancer: Directs service requests to available service instances based on a load-balancing strategy.
  5. Health Check: Ensures that only healthy service instances are registered and available for service discovery.

References

Acceptance Criteria

  1. Service Registry Setup: Implement a service registry (e.g., Eureka, Consul) to manage the dynamic locations of service instances.
  2. Service Registration and Discovery: Ensure that services can register themselves with the service registry and that consumers can discover these services.
  3. Load Balancing and Health Checks: Integrate load balancing and health checks to maintain the availability and reliability of the service instances.
lokytech5 commented 1 year ago

can you assign me this

lokytech5 commented 1 year ago

Please specify if I can use Spring Boot to implement the design or core Java.

iluwatar commented 1 year ago

Yes, Spring Boot can be used. It has been used in some other patterns as well.

lokytech5 commented 1 year ago

currently on it

stale[bot] commented 11 months ago

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.

ankurnotwarikoo commented 5 months ago

How do you plan to implement this ? What all microservices do you want to discover can I get a gist of those ?

iluwatar commented 5 months ago

The issue is currently unassigned. We are open for proposals 😀