Eureka Service Discovery#
Eureka is a RESTful service that is primarily used in the AWS cloud for the purpose of discovery, load balancing, and failover of middle-tier servers.
This page explains how Stork can use Eureka to handle the service registration.
Dependency#
First, you need to add the Stork Eureka Service Registration provider:
<dependency>
<groupId>io.smallrye.stork</groupId>
<artifactId>stork-service-registration-eureka</artifactId>
<version>2.7.1</version>
</dependency>
Service registration configuration#
For each service that should register the service instances in Eureka, configure the service registrar type
:
stork.my-service.service-registrar.type=eureka
stork.my-service.service-registrar.eureka-host=localhost
stork.my-service.service-registrar.eureka-port=8761
quarkus.stork.my-service.service-registrar.type=eureka
quarkus.stork.my-service.service-registrar.eureka-host=localhost
quarkus.stork.my-service.service-registrar.eureka-port=8761
Eureka service registrar is configured with the following parameters:
Attribute | Mandatory | Default Value | Description |
---|---|---|---|
eureka-host |
No | localhost |
The Eureka host. |
eureka-port |
No | 8761 |
The Eureka port. |
eureka-context-path |
No | / |
The Eureka server root context path. |
eureka-trust-all |
No | false |
Enable/Disable the TLS certificate verification |
eureka-tls |
No | false |
Use TLS to connect to the Eureka server |