Skip to content
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

Does RequestMirrorPolicy support xDS? #34916

Closed
whutwhu opened this issue Jun 26, 2024 · 3 comments
Closed

Does RequestMirrorPolicy support xDS? #34916

whutwhu opened this issue Jun 26, 2024 · 3 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@whutwhu
Copy link

whutwhu commented Jun 26, 2024

We rely on xDS to dynamically fetch resources from our control plane, following the flow: vhds -> cds -> eds. This means the client fetches vhds first on demand, then cds, and finally eds. When supporting request mirroring, is it possible to also fetch the mirrored cluster via xDS?

For example, we configure the request_mirror_policies in the vhds in the control plane, as shown below. The "backendCluster" can be fetched from CDS, but the mirrored cluster "darkBackendCluster" cannot be fetched, resulting in the error message: "shadow cluster 'darkBackendCluster' does not exist."

According to the manual, the cluster specified in request_mirror_policies must exist in the cluster manager configuration. Does this mean that request_mirror_policies cannot support xDS?

Here is our vhds configuration from the control plane, with request_mirror_policies included:

vhds:
{
"name": "global/backService",
"version": "227659762142",
"resource": {
"@type": "type.googleapis.com/envoy.config.route.v3.VirtualHost",
"name": "global/backendService",
"domains": [
"backendService"
],
"requestMirrorPolicies": [
{
"cluster": "darkBackendCluster"
}
]
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"cluster": "backendCluster",
}
}
]
}
}

@whutwhu whutwhu added the triage Issue requires triage label Jun 26, 2024
@mattklein123 mattklein123 added question Questions that are neither investigations, bugs, nor enhancements and removed triage Issue requires triage labels Jun 26, 2024
@mattklein123
Copy link
Member

See the validate_clusters option. It should allow it to load and fail gracefully at runtime if the cluster doesn't exist.

// An optional boolean that specifies whether the clusters that the route
  // table refers to will be validated by the cluster manager. If set to true
  // and a route refers to a non-existent cluster, the route table will not
  // load. If set to false and a route refers to a non-existent cluster, the
  // route table will load and the router filter will return a 404 if the route
  // is selected at runtime. This setting defaults to true if the route table
  // is statically defined via the :ref:`route_config
  // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config>`
  // option. This setting default to false if the route table is loaded dynamically via the
  // :ref:`rds
  // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds>`
  // option. Users may wish to override the default behavior in certain cases (for example when
  // using CDS with a static route table).
  google.protobuf.BoolValue validate_clusters = 7;

Copy link

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 github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 26, 2024
Copy link

github-actions bot commented Aug 2, 2024

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

2 participants