Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions architecture/topics/alternate_backends_weights.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ with each endpoint getting at least 1. If the service `weight` is 0 each
of the service's endpoints will get 0.

The `weight` must be in the range 0-256. The default is 1. When the `weight` is
0 no requests are passed to the service. If all services have `weight` 0,
requests are returned with a 503 error. When a service has no endpoints, the weight
is effectively 0.
0, the service does not participate in load-balancing but continues to serve
existing persistent connections.

When using `alternateBackends` also use the `roundrobin` load balancing strategy to ensure requests are distributed
as expected to the services based on `weight`. `roundrobin` can be set for a
Expand Down
7 changes: 5 additions & 2 deletions dev_guide/deployments/advanced_deployment_strategies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ service is the `service_weight` divided by the `sum_of_weights`. The
the sum of the endpoint `weights` is the service `weight`.

The route can have up to four services. The `weight` for the service can be
between `0` and `256`. When the `weight` is `0`, no new requests go to the
service, however existing connections remain active. When the service `weight`
between `0` and `256`. When the `weight` is `0`, the service does not participate in load-balancing
but continues to serve existing persistent connections. When the service `weight`
is not `0`, each endpoint has a minimum `weight` of `1`. Because of this, a
service with a lot of endpoints can end up with higher `weight` than desired.
In this case, reduce the number of pods to get the desired load balance
Expand Down Expand Up @@ -209,6 +209,9 @@ service with default `weight=1` so all requests go to it. Adding the other servi
an `alternateBackends` and adjusting the `weights` will bring the A/B setup to life.
This can be done by the `oc set route-backends` command or by editing the route.
+
Setting the `oc set route-backend` to 0 means the service does not participate
in load-balancing but continues to serve existing persistent connections.
+
[NOTE]
====
Changes to the route just change the portion of traffic to the various services.
Expand Down