Skip to content

Permit Source configuration for weighted routing in VirtualServer #8521

@eanveden

Description

@eanveden

Is your feature request related to a problem? Please describe.

Hi! my team is looking to enable traffic splitting for our NGINX gateway using Virtualserver/VSR. One thing that we are currently interested in is configuring a custom key for the split_client hash to enable weighted routing based on our a custom string/key.

One such as a case is when we have a inc header "http_call_id", for which we would like to route calls to the same upstream, but still split our calls (uniquely identified by call_id) between several upstreams for A/B testing, Blue/green, and Canary testing.

Describe the solution you'd like

One solution could be to allow this field to be configured under each route - for example something like below:

	path: /tea
	splitsKey: "$http_call_id"
	splits:
	- weight: 80
	action:
		pass: coffee-v1
	- weight: 20
	action:
		pass: coffee-v2

Describe alternatives you've considered
Alternatives such as http-snippets works - but its impractical when you want to avoid enabling snippets in general since we have a lot of partner teams using our gateway, and snippets tend to break the overall IC configuration generation.

Additional context
I would be happy to make a contribution myself, but I don't want to waste time implementing something if you guys think its a waste.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalAn issue that proposes a feature requestwaiting for responseWaiting for author's response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions