envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.76k stars 4.76k forks source link

Connection pool per stream info for dynamic forward proxy #26817

Closed sridbv closed 1 year ago

sridbv commented 1 year ago

Add a new config parameter connection_pool_per_key_format in cluster proto

Description: Solving a use-case to create unique connection pool based on the stream info ( request headers & dynamic-metadata ) when using the cluster type "dynamic_forward_proxy". I have a patch developed based on the implementation of "connection_pool_per_downstream_connection". Request for additional inputs or comments, so as to move forward with raising a PR for the same. Below is an example config.

connection_pool_per_key_format: "%REQ(:authority)%:%DYNAMIC_METADATA(my.namespace:test)%"

[optional Relevant Links:]

Any extra documentation required to understand the issue.

sridbv commented 1 year ago

@alyssawilk: noticed you have some ongoing in DFP, tagging you for your inputs. Also is it possible to add the label area/forward proxy.

alyssawilk commented 1 year ago

yeah it would have been nice if the cluster config connection_pool_per_downstream_connection were something extensible, where it would have been a hash on downstream address. I think as long as we follow convention for how we set these up I think it'd be a nice feature to have

alyssawilk commented 1 year ago

one thing to be clear about in the API is if this replaces or extends existing hashing options. I'd be inclined to extend, but we should be clear in docs.

sridbv commented 1 year ago

@alyssawilk Can you give direction on how to move forward to converge on the API ? ( Please note I am newbie to envoy contribution)

alyssawilk commented 1 year ago

honestly your best bet is to prototype the change, and get an API shepherd assigned to that PR.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.