Skip to content

groot-mg/service-discovery

Repository files navigation

Service Discovery

CI Workflow Quality Gate Status License: MIT

The purpose of a service discovery is load balancing and failover of middle-tier servers. It plays a critical role a mid-tier infra.

Each service will self register in the service discovery and the API Gateway responsible for receiving the user requests, will forward the requests to the registered services in the service discovery.

Build, tests and run

Build + unit tests

Build with gradle (build + unit tests):

./gradlew sd-app:build

Functional tests

The application needs to be running before run the Functional Tests:

./gradlew sd-app:bootRun

Run functional-tests:

./gradlew cucumber

Run

Service discovery does not have any dependency on the groot-mg project, so it is easy to run it locally.

Local app is available on the port 8081, health check endpoint is http://localhost:8081/private/health

./gradlew bootRun

Alternatively, it is possible to run using java -jar sd-app/build/libs/service-discovery.jar

Run together with the project

Service discovery should run together with the API Gateway and other services in the project, to run all together, please see docker-local-setup.