From acb7e1caac9c27911448f8595d699893dacff7fd Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 30 Apr 2018 23:56:00 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__gatewayfilter_factories.html | 7 +++++-- single/spring-cloud-gateway.html | 7 +++++-- spring-cloud-gateway.xml | 11 +++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) 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.

5.4 Hystrix GatewayFilter Factory

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.

5.4 Hystrix 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 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.

5.5 PrefixPath GatewayFilter Factory

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

+

5.5 PrefixPath GatewayFilter Factory

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.

5.4 Hystrix GatewayFilter Factory

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.

5.4 Hystrix 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 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.

5.5 PrefixPath GatewayFilter Factory

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

+

5.5 PrefixPath GatewayFilter Factory

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 i
 
 
Hystrix 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 the HystrixCommand. application.yml @@ -408,6 +411,14 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i 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 + +
PrefixPath GatewayFilter Factory