-
Notifications
You must be signed in to change notification settings - Fork 229
WIP: Document hash-based routing #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||
| --- | ||||||
| title: Hash-Based Routing | ||||||
| owner: CF for VMs Networking | ||||||
| --- | ||||||
|
|
||||||
| ## <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. | ||||||
|
|
||||||
| ## <a id="key-features"></a> Key Features | ||||||
|
|
||||||
| - **Configurable via Per-Route Options**: Easily set up Hash-Based Routing using application route options | ||||||
| - **Consistent Hashing**: Implements the Maglev consistent hashing algorithm as outlined in the paper "Maglev: A Fast and Reliable Software Network Load Balancer" (https://storage.googleapis.com/gweb-research2023-media/pubtools/2904.pdf) | ||||||
|
||||||
| - **Consistent Hashing**: Implements the Maglev consistent hashing algorithm as outlined in the paper "Maglev: A Fast and Reliable Software Network Load Balancer" (https://storage.googleapis.com/gweb-research2023-media/pubtools/2904.pdf) | |
| - **Consistent Hashing**: Consistent hashing via 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) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **Minimal Rehashing**: Uses the Maglev lookup table to map application instances by hash, minimizing changes to hash assignments when application instances are added or removed | |
| - **Minimal Rehashing**: The Maglev Algorithm minimizes changes to the mapping table (header->instance), when application instances are added or removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the (header->instance) bit, or at least change it to (hash -> instance).
b1tamara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
b1tamara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **Handling imbalanced loads**: Implements detection and mitigation of higher request loads on single instances due to different usage patterns for specific hashes. This avoids overloading a single instance while keeping instances for a particular hash at a minimum. | |
| - **Handling imbalanced loads**: Imbalanced load on a subset of instances is avoided. This avoids overloading a single instance while keeping instances for a particular hash at a minimum. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is avoided" is passive voice and that should be avoided ;-)
b1tamara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the sticky session counted towards the balance / in-flight requests or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in-flight requests will be counted (incl. sticky session requests). It happens via {RoundRobin Iterater | HashBased Iterator | LeastConnection Iterator}.PreRequest logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link to per-route-options documentation?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same words twice.
WDYT about
Configurable via Per-Route Options: Hash-Based load-balancing setup through application route options