Detailed specification including that of for all the involved components is provided in the RFC
Route definition is extended by generic options map with a load balancing algorithm. Options can be optionally specified in the following way with a json key lb_algo for the load balancing algorithm, e.g.
Supported load-balancing algorithms are specified in the Gorouter configuration in the LoadBalancingStrategies list. If a load balancing algorithm, provided for a route, is not in this configured list, the pool load balancing algorithm is kept and the error invalid-endpoint-load-balancing-algorithm-provided-keeping-pool-lb-algo is logged.
RegistryMessage structure is extended by an Options field of type RegistryMessageOpts structure, currently only containing the LoadBalancingAlgorithm field. Endpoint structure is extended by LoadBalancingAlgorithm field.
When initialising new endpoints, the load balancing algorithm is initialised to the value from the corresponding registry message option. When endpoints are registered and added to the pool, the load balancing algorithm of a pool is set to that one of a new endpoint.
RouteRegistry structure is extended by a new field DefaultLoadBalancingAlgorithm, which is initialised by the Gorouter default load balancing configuration property LoadBalance. This default value is a default load balancing algorithm for a new pool.
Since the route options are optional, not providing them has no effect on the existing default load balancing algorithm logic.
Summary
Detailed specification including that of for all the involved components is provided in the RFC
Route definition is extended by generic options map with a load balancing algorithm. Options can be optionally specified in the following way with a json key lb_algo for the load balancing algorithm, e.g.
Supported load-balancing algorithms are specified in the Gorouter configuration in the LoadBalancingStrategies list. If a load balancing algorithm, provided for a route, is not in this configured list, the pool load balancing algorithm is kept and the error invalid-endpoint-load-balancing-algorithm-provided-keeping-pool-lb-algo is logged.
RegistryMessage structure is extended by an Options field of type RegistryMessageOpts structure, currently only containing the LoadBalancingAlgorithm field. Endpoint structure is extended by LoadBalancingAlgorithm field.
When initialising new endpoints, the load balancing algorithm is initialised to the value from the corresponding registry message option. When endpoints are registered and added to the pool, the load balancing algorithm of a pool is set to that one of a new endpoint.
RouteRegistry structure is extended by a new field DefaultLoadBalancingAlgorithm, which is initialised by the Gorouter default load balancing configuration property LoadBalance. This default value is a default load balancing algorithm for a new pool.
Since the route options are optional, not providing them has no effect on the existing default load balancing algorithm logic.
Backward Compatibility
Breaking Change? No
Check list
Resolves: cloudfoundry/routing-release#421