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
Copy file name to clipboardExpand all lines: api/pkg/filtermanager/api/api.go
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,30 @@ type FilterProcessCallbacks interface {
264
264
265
265
typeDecoderFilterCallbacksinterface {
266
266
FilterProcessCallbacks
267
+
// Sets an upstream address override for the request. When the overridden host exists in the host list of the routed cluster
268
+
// and can be selected directly, the load balancer bypasses its algorithm and routes traffic directly to the specified host.
269
+
//
270
+
// Here are some cases:
271
+
// 1. Set a valid host(no matter in or not in the cluster), will route to the specified host directly and return 200.
272
+
// 2. Set a non-IP host, C++ side will return error and not route to cluster.
273
+
// 3. Set a unavailable host, and the host is not in the cluster, will req the valid host in the cluster and return 200.
274
+
// 4. Set a unavailable host, and the host is in the cluster, but not available(can not connect to the host), will req the unavailable hoat and return 503.
275
+
// 5. Set a unavailable host, and the host is in the cluster, but not available(can not connect to the host), and with retry. when first request with unavailable host failed 503, the second request will retry with the valid host, then the second request will succeed and finally return 200.
276
+
// 6. Set a unavailable host with strict mode, and the host is in the cluster, will req the unavailable host and return 503.
277
+
// 7. Set a unavailable host with strict mode, and the host is not in the cluster, will req the unavailable host and return 503.
278
+
// 8. Set a unavailable host with strict mode and retry. when first request with unavailable host failed 503, the second request will retry with the valid host, then the second request will succeed and finally return 200.
279
+
// 9. Set a unavailable host with strict mode and retry, and the host is not in the cluster, will req the unavailable host and return 503.
280
+
//
281
+
// The function takes two arguments:
282
+
//
283
+
// host (string): The upstream host address to use for the request. This must be a valid IP address(with port); otherwise, the
284
+
// C++ side will throw an error.
285
+
//
286
+
// strict (boolean): Determines whether the HTTP request must be strictly routed to the requested
287
+
// host. When set to ``true``, if the requested host is invalid, Envoy will return a 503 status code.
288
+
// The default value is ``false``, which allows Envoy to fall back to its load balancing mechanism. In this case, if the
289
+
// requested host is invalid, the request will be routed according to the load balancing algorithm and choose other hosts.
0 commit comments