diff --git a/multi/multi__gatewayfilter_factories.html b/multi/multi__gatewayfilter_factories.html index 7a9af8ba..01a40278 100644 --- a/multi/multi__gatewayfilter_factories.html +++ b/multi/multi__gatewayfilter_factories.html @@ -27,7 +27,8 @@ uri: http://example.org filters: - AddResponseHeader=X-Response-Foo, Bar
-
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml. +
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
Hystrix is a library from Netflix that implements the circuit breaker pattern. +The Hystrix GatewayFilter allows you to introduce circuit breakers to your gateway routes, protecting your services from cascading failures and allowing you to provide fallback responses in the event of downstream failures.
To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml.
spring: cloud: gateway: @@ -51,7 +52,9 @@ name: fallbackcmd fallbackUri: forward:/incaseoffailureusethis - RewritePath=/consumingserviceendpoint, /backingserviceendpoint
-
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml. +
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
Hystrix settings (such as timeouts) can be configured with global defaults or on a route by route basis using application properties as explained on the Hystrix wiki.
To set a 5 second timeout for the example route above, the following configuration would be used:
application.yml. +
hystrix.command.fallbackcmd.execution.isolation.thread.timeoutInMilliseconds: 5000
+
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml.
spring: cloud: gateway: diff --git a/single/spring-cloud-gateway.html b/single/spring-cloud-gateway.html index 043998da..fd1acb74 100644 --- a/single/spring-cloud-gateway.html +++ b/single/spring-cloud-gateway.html @@ -144,7 +144,8 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i uri: http://example.org filters: - AddResponseHeader=X-Response-Foo, Bar
-
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml. +
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
Hystrix is a library from Netflix that implements the circuit breaker pattern. +The Hystrix GatewayFilter allows you to introduce circuit breakers to your gateway routes, protecting your services from cascading failures and allowing you to provide fallback responses in the event of downstream failures.
To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml.
spring: cloud: gateway: @@ -168,7 +169,9 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i name: fallbackcmd fallbackUri: forward:/incaseoffailureusethis - RewritePath=/consumingserviceendpoint, /backingserviceendpoint
-
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml. +
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
Hystrix settings (such as timeouts) can be configured with global defaults or on a route by route basis using application properties as explained on the Hystrix wiki.
To set a 5 second timeout for the example route above, the following configuration would be used:
application.yml. +
hystrix.command.fallbackcmd.execution.isolation.thread.timeoutInMilliseconds: 5000
+
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml.
spring: cloud: gateway: diff --git a/spring-cloud-gateway.xml b/spring-cloud-gateway.xml index c0f5c637..77014dd5 100644 --- a/spring-cloud-gateway.xml +++ b/spring-cloud-gateway.xml @@ -372,6 +372,9 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway iHystrix GatewayFilter Factory +Hystrix is a library from Netflix that implements the circuit breaker pattern. +The Hystrix GatewayFilter allows you to introduce circuit breakers to your gateway routes, protecting your services from cascading failures and allowing you to provide fallback responses in the event of downstream failures. +To enable Hystrix GatewayFilters in your project, add a dependency on spring-cloud-starter-netflix-hystrix from Spring Cloud Netflix.The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of theHystrixCommand .application.yml @@ -408,6 +411,14 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway iThis will forward to the +/incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via thelb prefix on the destination URI.Hystrix settings (such as timeouts) can be configured with global defaults or on a route by route basis using application properties as explained on the Hystrix wiki. +To set a 5 second timeout for the example route above, the following configuration would be used: ++ application.yml ++ +hystrix.command.fallbackcmd.execution.isolation.thread.timeoutInMilliseconds: 5000 +PrefixPath GatewayFilter Factory