Targets

class Targets(bases: List<URI>, cooldownNanos: Long = DEFAULT_COOLDOWN_NANOS)

The nodes an open-loop run sends to, round robin, as a load balancer with passive health checks would (performance item 6): a node whose connection fails is left out for cooldownNanos, then tried again, so a node stopped in a hand-over run gets no more requests until it is back.

An operation whose connection was refused was never sent: it runs again on the next node, its latency still counted from its scheduled time (rerouted counts them). A connection that failed otherwise may have carried the request, which a command does not repeat safely: that operation fails as it did, and its node is left out.

Constructors

Link copied to clipboard
constructor(bases: List<URI>, cooldownNanos: Long = DEFAULT_COOLDOWN_NANOS)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The operations a refused connection moved to another node.

Functions

Link copied to clipboard
fun pick(index: Long): Int

The node operation index goes to: round robin over the nodes not left out, the round robin's when all are.

Link copied to clipboard
fun run(scenario: Scenario, client: Client, index: Long, account: Int, other: Int): CompletableFuture<String?>

Runs operation index of scenario on account (and other), moving it on when a node refuses it.