cloud_controller_ng icon indicating copy to clipboard operation
cloud_controller_ng copied to clipboard

Support Hash-Based Routing

Open hoffmaen opened this issue 1 month ago • 0 comments

This Pull-Request adds support for hash-based routing to Cloud Controller.

Summary: The routes model is enhanced as follows:

  • hash is added as a valid loadbalancing option
  • hash_header is added as a per-route option. The option is mandatory when loadbalancing=hash
  • hash_balance is added as a per-route option. The option is optional when loadbalancing=hash

Validation of these options is added when creating and updating both via API and via manifest. When hash_balance is provided as an option, its value must be a float or a string representing a float.

The options are still stored as a raw JSON string in the routes table. The value for hash_balance is always stored as a string inside the JSON for consistency.

Logic is introduced to remove hash_balance and hash_header when switching from hash to another load-balancing algorithm. Incremental updates on per-route options are allowed, e.g. only updating hash_header or hash_balance while keeping other previously set per-route options is possible.

Links:

hoffmaen avatar Dec 09 '25 08:12 hoffmaen