Conversation
peanball
left a comment
There was a problem hiding this comment.
Some wording, some questions.
hoffmaen
left a comment
There was a problem hiding this comment.
Rephrasing key features
|
@ameowlia , is this something we also need to add to the TPCF commercial docs? |
|
Note to myself -- CF OSS docs only. |
cce4520 to
fffe4ce
Compare
|
|
||
| - `loadbalancing` - defines how Gorouter distributes requests across the application backends. Valid values are `round-robin` and `least-connection`. | ||
| - `loadbalancing` - defines how Gorouter distributes requests across the application backends. Valid values are `round-robin`, `least-connection` and `hash`. | ||
| - `hash_header` - defines the header used for hash-based routing decisions. Required when `loadbalancing` is set to `hash`. |
There was a problem hiding this comment.
| - `hash_header` - defines the header used for hash-based routing decisions. Required when `loadbalancing` is set to `hash`. | |
| - `hash_header` - defines the HTTP header used for hash-based routing decisions. Required when `loadbalancing` is set to `hash`. |
custom-per-route-options.html.md.erb
Outdated
| - `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. <%= vars.per_route_lb_version %> | ||
| - Settings: `round-robin`, `least-connection`. | ||
| - Settings: `round-robin`, `least-connection`, `hash`. | ||
| - `hash_header`: Defines the header Gorouter uses for routing decisions on this route. Required when `loadbalancing` is set to `hash`. Cannot be used with other load balancing algorithms. <%= vars.hash_routing_version %> |
There was a problem hiding this comment.
| - `hash_header`: Defines the header Gorouter uses for routing decisions on this route. Required when `loadbalancing` is set to `hash`. Cannot be used with other load balancing algorithms. <%= vars.hash_routing_version %> | |
| - `hash_header`: Defines the HTTP header used for hash-based routing decisions. Required when `loadbalancing` is set to `hash`. Cannot be used with other load balancing algorithms. <%= vars.hash_routing_version %> |
custom-per-route-options.html.md.erb
Outdated
| The per-route option `loadbalancing` allows configuring the load balancing algorithm, which defines how the load is distributed between Gorouters and backends. | ||
|
|
||
| This option supports two settings for load balancing: | ||
| This option supports three settings for load balancing: |
There was a problem hiding this comment.
| This option supports three settings for load balancing: | |
| This option supports the following settings for load balancing: |
make it future proof
custom-per-route-options.html.md.erb
Outdated
| For example: | ||
| <%= vars.hash_routing_version %> | ||
|
|
||
| Hash-Based Routing is a load-balancing method that routes incoming requests to application instances using a hash of a specific HTTP header value. This ensures consistent routing, so requests with the same header value always go to the same instance. The per-route hash options offer detailed control over hash-based load balancing for individual routes. |
There was a problem hiding this comment.
| Hash-Based Routing is a load-balancing method that routes incoming requests to application instances using a hash of a specific HTTP header value. This ensures consistent routing, so requests with the same header value always go to the same instance. The per-route hash options offer detailed control over hash-based load balancing for individual routes. | |
| Hash-Based Routing is a load-balancing method that routes incoming requests to application instances based on a specific HTTP header value. This ensures consistent routing, so requests with the same header value are always routed to the same instance. The per-route hash options offer detailed control over hash-based load balancing for individual routes. |
custom-per-route-options.html.md.erb
Outdated
| ``` | ||
|
|
||
| Alternatively, you can query the `routes` API endpoint for a route: | ||
| To unset the balance factor, run the `update-route` command with `hash_balance` set to 0. |
There was a problem hiding this comment.
Wouldn't it be more idiomatic to use -r hash_balance?
| @@ -0,0 +1,58 @@ | |||
| --- | |||
There was a problem hiding this comment.
We're already covering a lot of details in custom-per-route-options.html.md.erb. Have you considered moving the sections specific to hash-based routing to this file?
hash-based-routing.html.md.erb
Outdated
|
|
||
| ## <a id="purpose"></a> Purpose | ||
|
|
||
| Hash-Based Routing is a load-balancing algorithm that distributes incoming requests to application instances based on a hash of a specific HTTP header value, e.g., `X-Resource-ID` or `Tenant-ID`. This ensures consistent routing behavior where requests containing the same header value are always directed to the same instance. |
There was a problem hiding this comment.
| Hash-Based Routing is a load-balancing algorithm that distributes incoming requests to application instances based on a hash of a specific HTTP header value, e.g., `X-Resource-ID` or `Tenant-ID`. This ensures consistent routing behavior where requests containing the same header value are always directed to the same instance. | |
| Hash-Based Routing is a load-balancing algorithm that distributes incoming requests to application instances, based on the value of a configured HTTP header. Typically, this can be a header which identifies the user or session, such as `X-Resource-ID` or `Tenant-ID`. This ensures consistent routing behavior where requests containing the same header value are always directed to the same instance. |
hash-based-routing.html.md.erb
Outdated
| - **Session Affinity Precedence**: Session affinity (sticky sessions) is prioritized over Hash-Based Routing | ||
| - **No availability zones preference**: The global properties `locallyOptimistic` and `localAvailabilityZone` are ignored when using Hash-Based Routing | ||
| - **Consistent Hashing**: Implementation of the Maglev Algorithm (see [Maglev: A Fast and Reliable Software Network Load Balancer](https://storage.googleapis.com/gweb-research2023-media/pubtools/2904.pdf) for details) | ||
| - **Minimal Rehashing**: Usage of the Maglev Algorithm to map application instances by hash ensures that hash positions are shifted to other instances as little as possible when application instances are added or removed |
There was a problem hiding this comment.
| - **Minimal Rehashing**: Usage of the Maglev Algorithm to map application instances by hash ensures that hash positions are shifted to other instances as little as possible when application instances are added or removed | |
| - **Minimal Rehashing**: Usage of the Maglev Algorithm ensures that the mapping of header values to application instances remains as consistent as possible, when application instances are added or removed |
The fact that the algorithm hashes the header value, and maps the hash to an instance is not relevant here.
Co-authored-by: Clemens Hoffmann <clemens.hoffmann@sap.com>
fffe4ce to
b86eeb4
Compare
d35bcb7 to
6eb97da
Compare
|
Prepared cloudfoundry/docs-book-cloudfoundry#154 to introduce the variable |
Hash-based routing document as a part of [RFC0042] Hash-Based Load Balancing Algorithm for CF Routing
Note: as of now, there is no cf-deployment release containing the hash-based routing, since the PR is in review;
vars.hash_routing_versionis not set.For reference: Document hash_based_routing feature flag
Rendered to test according to the README