You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each HTTP request, the proxy CAN communicate the subset of endpoints the EPP MUST pick from by setting an unstructured entry in the [filter metadata](https://github.com/envoyproxy/go-control-plane/blob/63a55395d7a39a8d43dcc7acc3d05e4cae7eb7a2/envoy/config/core/v3/base.pb.go#L819) field of the ext-proc request. The metadata entry for the subset list MUST be wrapped with an outer key (which represents the metadata namespace) with a default of `envoy.lb.subset_hint`.
For each HTTP request, the EPP MUST communicate to the proxy the picked model server endpoint via:
13
25
14
26
1. Setting the `x-gateway-destination-endpoint` HTTP header to the selected endpoint in <ip:port> format.
15
27
16
-
2. Set an unstructured entry in the [dynamic_metadata](https://github.com/envoyproxy/go-control-plane/blob/c19bf63a811c90bf9e02f8e0dc1dcef94931ebb4/envoy/service/ext_proc/v3/external_processor.pb.go#L320) field of the ext-proc response. The metadata entry for the picked endpoint MUST be wrapped with an outer key (which represents the metadata namespace) with a default of `envoy.lb`.
28
+
2. Set an unstructured entry in the [dynamic_metadata](https://github.com/envoyproxy/go-control-plane/blob/c19bf63a811c90bf9e02f8e0dc1dcef94931ebb4/envoy/service/ext_proc/v3/external_processor.pb.go#L320) field of the ext-proc response. The metadata entry for the picked endpoints MUST be wrapped with an outer key (which represents the metadata namespace) with a default of `envoy.lb`.
17
29
18
-
The final metadata necessary would look like:
30
+
The pirmary endpoint MUST be set using the key `x-gateway-destination-endpoint` as follows:
19
31
```go
20
32
dynamicMetadata: {
21
33
"envoy.lb": {
22
-
"x-gateway-destination-endpoint": <ip:port>"
34
+
"x-gateway-destination-endpoint": <ip:port>
35
+
}
36
+
}
37
+
```
38
+
39
+
Fallback endpoints MUST be set using the key `x-gateway-destination-endpoint-fallbacks` as a list as follows:
- If the EPP did not communicate the server endpoint via these two methods, it MUST return an error.
29
50
- The EPP MUST not set two different values in the header and the inner response metadata value.
51
+
- Setting different value leads to unpredictable behavior because proxies aren't guaranteed to support both paths, and so this protocol does not define what takes precedence.
30
52
31
-
## Why envoy.lb namespace as a default?
53
+
###Why envoy.lb namespace as a default?
32
54
The `envoy.lb` namesapce is a predefined namespace used for subsetting. One common way to use the selected endpoint returned from the server, is [envoy subsets](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/subsets) where host metadata for subset load balancing must be placed under `envoy.lb`.
33
55
34
-
Setting different value leads to unpredictable behavior because proxies aren't guaranteed to support both paths, and so this protocol does not define what takes precedence.
0 commit comments