From b359ff3096d2319ea4e9aecebd647f71932b2165 Mon Sep 17 00:00:00 2001
From: buildmaster zuul.ignoreSecurityHeaders to false. This can be useful if you disabled the HTTP Security response headers in Spring Security and want the values provided by downstream services
If you are using @EnableZuulProxy with tha Spring Boot Actuator you
-will enable (by default) an additional endpoint, available via HTTP as
-/routes. A GET to this endpoint will return a list of the mapped
+To not discard these well known security headers in case Spring Security is on the classpath you can set zuul.ignoreSecurityHeaders to false. This can be useful if you disabled the HTTP Security response headers in Spring Security and want the values provided by downstream services
If you are using @EnableZuulProxy with the Spring Boot Actuator you
+will enable (by default) two additional endpoints:
A GET to the routes endpoint at /routes will return a list of the mapped
routes:
GET /routes.
{ /stores/**: "http://localhost:8081" @@ -198,7 +197,9 @@ string to/routes. This will produce the following case there have been changes in the service catalog). You can disable this endpoint by settingendpoints.routes.enabledtofalse.
Note the routes should respond automatically to changes in the service catalog, but the POST to /routes is a way to force the change -to happen immediately.
A GET to the filters endpoint at /filters will return a map of Zuul
+filters by type. For each filter type in the map, you will find a list
+of all the filters of that type, along with their details.
A common pattern when migrating an existing application or API is to "strangle" old endpoints, slowly replacing them with different implementations. The Zuul proxy is a useful tool for this because you can use it to handle all traffic from clients of the old endpoints, diff --git a/multi/multi_netflix-metrics.html b/multi/multi_netflix-metrics.html index 465ea7789..75025af85 100644 --- a/multi/multi_netflix-metrics.html +++ b/multi/multi_netflix-metrics.html @@ -24,7 +24,7 @@ restTemplate.getForObject(</dependency>
In Spectator parlance, a meter is a named, typed, and tagged configuration and a metric represents the value of a given meter at a point in time. Spectator meters are created and controlled by a registry, which currently has several different implementations. Spectator provides 4 meter types: counter, timer, gauge, and distribution summary.
Spring Cloud Spectator integration configures an injectable com.netflix.spectator.api.Registry instance for you. Specifically, it configures a ServoRegistry instance in order to unify the collection of REST metrics and the exporting of metrics to the Atlas backend under a single Servo API. Practically, this means that your code may use a mixture of Servo monitors and Spectator meters and both will be scooped up by Spring Boot Actuator MetricReader instances and both will be shipped to the Atlas backend.
A counter is used to measure the rate at which some event is occurring.
// create a counter with a name and a set of tags Counter counter = registry.counter("counterName", "tagKey1", "tagValue1", ...); counter.increment(); // increment when an event occurs -counter.increment(10); // increment by a discrete amount
The counter records a single time-normalized statistic.
A timer is used to measure how long some event is taking. Spring Cloud automatically records timers for Spring MVC requests and conditionally RestTemplate requests, which can later be used to create dashboards for request related metrics like latency:
// create a timer with a name and a set of tags +counter.increment(10); // increment by a discrete amount
The counter records a single time-normalized statistic.
A timer is used to measure how long some event is taking. Spring Cloud automatically records timers for Spring MVC requests and conditionally RestTemplate requests, which can later be used to create dashboards for request related metrics like latency:
// create a timer with a name and a set of tags Timer timer = registry.timer("timerName", "tagKey1", "tagValue1", ...); // execute an operation and time it at the same time diff --git a/multi/multi_spring-cloud-netflix.html b/multi/multi_spring-cloud-netflix.html index 7636cb2b2..472b68af4 100644 --- a/multi/multi_spring-cloud-netflix.html +++ b/multi/multi_spring-cloud-netflix.html @@ -1,3 +1,3 @@ -Spring Cloud Netflix \ No newline at end of file +Table of Contents
- 1. Service Discovery: Eureka Clients
- 1.1. How to Include Eureka Client
- 1.2. Registering with Eureka
- 1.3. Authenticating with the Eureka Server
- 1.4. Status Page and Health Indicator
- 1.5. Registering a Secure Application
- 1.6. Eureka’s Health Checks
- 1.7. Eureka Metadata for Instances and Clients
- 1.8. Using the EurekaClient
- 1.9. Alternatives to the native Netflix EurekaClient
- 1.10. Why is it so Slow to Register a Service?
- 1.11. Zones
- 2. Service Discovery: Eureka Server
- 3. Circuit Breaker: Hystrix Clients
- 4. Circuit Breaker: Hystrix Dashboard
- 5. Hystrix Timeouts And Ribbon Clients
- 6. Client Side Load Balancer: Ribbon
- 6.1. How to Include Ribbon
- 6.2. Customizing the Ribbon Client
- 6.3. Customizing default for all Ribbon Clients
- 6.4. Customizing the Ribbon Client using properties
- 6.5. Using Ribbon with Eureka
- 6.6. Example: How to Use Ribbon Without Eureka
- 6.7. Example: Disable Eureka use in Ribbon
- 6.8. Using the Ribbon API Directly
- 6.9. Caching of Ribbon Configuration
- 6.10. How to Configure Hystrix thread pools
- 7. Declarative REST Client: Feign
- 8. External Configuration: Archaius
- 9. Router and Filter: Zuul
- 9.1. How to Include Zuul
- 9.2. Embedded Zuul Reverse Proxy
- 9.3. Zuul Http Client
- 9.4. Cookies and Sensitive Headers
- 9.5. Ignored Headers
- 9.6. The Routes Endpoint
- 9.7. Strangulation Patterns and Local Forwards
- 9.8. Uploading Files through Zuul
- 9.9. Query String Encoding
- 9.10. Plain Embedded Zuul
- 9.11. Disable Zuul Filters
- 9.12. Providing Hystrix Fallbacks For Routes
- 9.13. Rewriting
Locationheader- 9.14. Zuul Developer Guide
- 9.14.1. The Zuul Servlet
- 9.14.2. Zuul RequestContext
- 9.14.3.
@EnableZuulProxyvs.@EnableZuulServer- 9.14.4.
@EnableZuulServerFilters- 9.14.5.
@EnableZuulProxyFilters- 9.14.6. Custom Zuul Filter examples
- 9.14.7. How to Write a Pre Filter
- 9.14.8. How to Write a Route Filter
- 9.14.9. How to Write a Post Filter
- 9.14.10. How Zuul Errors Work
- 9.14.11. Zuul Eager Application Context Loading
- 10. Polyglot support with Sidecar
- 11. RxJava with Spring MVC
- 12. Metrics: Spectator, Servo, and Atlas
- 13. HTTP Clients
Spring Cloud Netflix Table of Contents
- 1. Service Discovery: Eureka Clients
- 1.1. How to Include Eureka Client
- 1.2. Registering with Eureka
- 1.3. Authenticating with the Eureka Server
- 1.4. Status Page and Health Indicator
- 1.5. Registering a Secure Application
- 1.6. Eureka’s Health Checks
- 1.7. Eureka Metadata for Instances and Clients
- 1.8. Using the EurekaClient
- 1.9. Alternatives to the native Netflix EurekaClient
- 1.10. Why is it so Slow to Register a Service?
- 1.11. Zones
- 2. Service Discovery: Eureka Server
- 3. Circuit Breaker: Hystrix Clients
- 4. Circuit Breaker: Hystrix Dashboard
- 5. Hystrix Timeouts And Ribbon Clients
- 6. Client Side Load Balancer: Ribbon
- 6.1. How to Include Ribbon
- 6.2. Customizing the Ribbon Client
- 6.3. Customizing default for all Ribbon Clients
- 6.4. Customizing the Ribbon Client using properties
- 6.5. Using Ribbon with Eureka
- 6.6. Example: How to Use Ribbon Without Eureka
- 6.7. Example: Disable Eureka use in Ribbon
- 6.8. Using the Ribbon API Directly
- 6.9. Caching of Ribbon Configuration
- 6.10. How to Configure Hystrix thread pools
- 7. Declarative REST Client: Feign
- 8. External Configuration: Archaius
- 9. Router and Filter: Zuul
- 9.1. How to Include Zuul
- 9.2. Embedded Zuul Reverse Proxy
- 9.3. Zuul Http Client
- 9.4. Cookies and Sensitive Headers
- 9.5. Ignored Headers
- 9.6. Management Endpoints
- 9.7. Strangulation Patterns and Local Forwards
- 9.8. Uploading Files through Zuul
- 9.9. Query String Encoding
- 9.10. Plain Embedded Zuul
- 9.11. Disable Zuul Filters
- 9.12. Providing Hystrix Fallbacks For Routes
- 9.13. Rewriting
Locationheader- 9.14. Zuul Developer Guide
- 9.14.1. The Zuul Servlet
- 9.14.2. Zuul RequestContext
- 9.14.3.
@EnableZuulProxyvs.@EnableZuulServer- 9.14.4.
@EnableZuulServerFilters- 9.14.5.
@EnableZuulProxyFilters- 9.14.6. Custom Zuul Filter examples
- 9.14.7. How to Write a Pre Filter
- 9.14.8. How to Write a Route Filter
- 9.14.9. How to Write a Post Filter
- 9.14.10. How Zuul Errors Work
- 9.14.11. Zuul Eager Application Context Loading
- 10. Polyglot support with Sidecar
- 11. RxJava with Spring MVC
- 12. Metrics: Spectator, Servo, and Atlas
- 13. HTTP Clients