Random Load Balancing#
The random
load balancing is a straightforward service instance selection solution that picks a random instance every time.
Dependency#
First, you need to add the random load-balancer to your project:
<dependency>
<groupId>io.smallrye.stork</groupId>
<artifactId>stork-load-balancer-random</artifactId>
<version>2.5.0</version>
</dependency>
Configuration#
For each service expected to use a random service selection, configure the load-balancer
to be random
:
Supported attributes are the following: