Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
Load balancers (Distributors)

Distributor as the part of test definition provides pairs of endpoints and queries for invokers. More...

Classes

class  com.griddynamics.jagger.invoker.CircularExclusiveAccessLoadBalancer< Q, E >
 Subclass of ExclusiveAccessLoadBalancer that circularly selects pairs of Q and E. More...
 
class  com.griddynamics.jagger.invoker.ExclusiveAccessLoadBalancer< Q, E >
 This com.griddynamics.jagger.invoker.LoadBalancer implementation provides guarantees that each query and endpoint pair will be in exclusive access, i.e. More...
 
class  com.griddynamics.jagger.user.test.configurations.loadbalancer.JLoadBalancer
 Provides load balancer aka distributor (how to pair endpoints and queries) (subtypes of QueryPoolLoadBalancer). More...
 
interface  com.griddynamics.jagger.invoker.LoadBalancer< Q, E >
 An object which provides pairs of queries and endpoints for Invoker. More...
 
class  com.griddynamics.jagger.invoker.NonCircularExclusiveAccessLoadBalancer< Q, E >
 Subclass of ExclusiveAccessLoadBalancer that provides each pair of Q and E only once (does not circle an iteration). More...
 
class  com.griddynamics.jagger.invoker.OneByOneLoadBalancer< Q, E >
 Schedules queries across endpoints one by one. More...
 
class  com.griddynamics.jagger.invoker.PairSupplierFactoryLoadBalancer< Q, E >
 
class  com.griddynamics.jagger.invoker.QueryPoolLoadBalancer< Q, E >
 LoadBalancer which uses query and endpoint provider. More...
 
class  com.griddynamics.jagger.invoker.RandomLoadBalancer< Q, E >
 Randomly selects pairs of Q and E. More...
 
class  com.griddynamics.jagger.invoker.RoundRobinLoadBalancer< Q, E >
 Encapsulates Round-Robin algorithm. More...
 
class  com.griddynamics.jagger.invoker.SimpleCircularLoadBalancer< Q, E >
 Circularly selects pairs of Q and E. More...
 
class  com.griddynamics.jagger.invoker.SimpleLoadBalancer< Q, E >
 Contains only one query and endpoint. More...
 

Detailed Description

Distributor as the part of test definition provides pairs of endpoints and queries for invokers.


Before start of the test distributor is combining all endpoints and queries according to user setup and stores these combination in internal list.
Important: mentioned list is shared by all threads that produce load. it is not possible to have separate list per workload thread
Before every invoke distributor is providing single pair of endpoint / query to invoker
Endpoints and queries can be combined in following combinations: Round Robin or One by one

Round Robin algorithm - for input endpoints [e1, e2] and queries [q1, q2, q3] creates following pairs:
(e1, q1), (e2, q2), (e1, q3), (e2, q1), (e1, q2), (e2, q3).

One by one algorithm - for input endpoints [e1, e2] and queries [q1, q2, q3] creates following pairs:
(e1, q1), (e2, q1), (e1, q2), (e2, q2), (e1, q3), (e2, q3).

Both Round Robin and One by one are supporting:

It is also possible to enable:

It is recommended to use JLoadBalancer to setup build-in distributers like in the example below
Or you can implement your own balancer by extending QueryPoolLoadBalancer
Example of the load balancer setup:

//begin: following section is used for docu generation - Load balancer setup
JTestDefinition jTestDefinition =
JTestDefinition.builder(Id.of("td_user_scenario_example"), new UserScenarioEndpointsProvider())
.withInvoker(new JHttpUserScenarioInvokerProvider())
// Exclusive access - single scenario is executed only by one virtual user at a time. No parallel execution
// Random seed - different virtual users execute scenarios in different order
.withLoadBalancer(JLoadBalancer.builder(ROUND_ROBIN)
.withExclusiveAccess()
.withRandomSeed(1234)
.build())
.addListener(JHttpUserScenarioInvocationListener.builder()
.withLatencyAvgStddevAggregators()
.withLatencyMinMaxAggregators()
.withLatencyPercentileAggregators(50D, 95D, 99D)
.build())
.build();
//end: following section is used for docu generation - Load balancer setup