Skip to content

Least Response Time Load Balancing

The least-response-time load balancing strategy monitors the operations and selects the fastest instance. This load balancer collects statistics and determines which instance will provide the shorter response time.

Dependency

First, you need to add the least-response-time load-balancer to your project:

<dependency>
    <groupId>io.smallrye.stork</groupId>
    <artifactId>stork-load-balancer-response-time</artifactId>
    <version>1.0.0</version>
</dependency>

Configuration

For each service expected to use a least-response-time selection, configure the load-balancer to be least-response-time:

stork.my-service.service-discovery=...
stork.my-service.service-discovery...=...
stork.my-service.load-balancer=least-response-time