Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2017-10-23 18:11:12 +00:00
parent ea40315a18
commit b359ff3096
5 changed files with 36 additions and 17 deletions
+5 -4
View File
@@ -173,9 +173,8 @@ classpath, and otherwise they are initialized to a set of well-known
"security" headers (e.g. involving caching) as specified by Spring
Security. The assumption in this case is that the downstream services
might add these headers too, and we want the values from the proxy.
To not discard these well known security headers in case Spring Security is on the classpath you can set <code class="literal">zuul.ignoreSecurityHeaders</code> to <code class="literal">false</code>. This can be useful if you disabled the HTTP Security response headers in Spring Security and want the values provided by downstream services</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_the_routes_endpoint" href="#_the_routes_endpoint"></a>9.6&nbsp;The Routes Endpoint</h2></div></div></div><p>If you are using <code class="literal">@EnableZuulProxy</code> with tha Spring Boot Actuator you
will enable (by default) an additional endpoint, available via HTTP as
<code class="literal">/routes</code>. 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 <code class="literal">zuul.ignoreSecurityHeaders</code> to <code class="literal">false</code>. This can be useful if you disabled the HTTP Security response headers in Spring Security and want the values provided by downstream services</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_management_endpoints" href="#_management_endpoints"></a>9.6&nbsp;Management Endpoints</h2></div></div></div><p>If you are using <code class="literal">@EnableZuulProxy</code> with the Spring Boot Actuator you
will enable (by default) two additional endpoints:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Routes</li><li class="listitem">Filters</li></ul></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_routes_endpoint" href="#_routes_endpoint"></a>9.6.1&nbsp;Routes Endpoint</h3></div></div></div><p>A GET to the routes endpoint at <code class="literal">/routes</code> will return a list of the mapped
routes:</p><p><b>GET /routes.&nbsp;</b>
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">{</span>
/stores/**: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"http://localhost:8081"</span>
@@ -198,7 +197,9 @@ string to <code class="literal">/routes</code>. This will produce the following
case there have been changes in the service catalog). You can disable
this endpoint by setting <code class="literal">endpoints.routes.enabled</code> to <code class="literal">false</code>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>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.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_strangulation_patterns_and_local_forwards" href="#_strangulation_patterns_and_local_forwards"></a>9.7&nbsp;Strangulation Patterns and Local Forwards</h2></div></div></div><p>A common pattern when migrating an existing application or API is to
to happen immediately.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_filters_endpoint" href="#_filters_endpoint"></a>9.6.2&nbsp;Filters Endpoint</h3></div></div></div><p>A GET to the filters endpoint at <code class="literal">/filters</code> 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.</p></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_strangulation_patterns_and_local_forwards" href="#_strangulation_patterns_and_local_forwards"></a>9.7&nbsp;Strangulation Patterns and Local Forwards</h2></div></div></div><p>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,
+1 -1
View File
@@ -24,7 +24,7 @@ restTemplate.getForObject(<span xmlns:d="http://docbook.org/ns/docbook" class="h
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/dependency&gt;</span></pre><p>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.</p><p>Spring Cloud Spectator integration configures an injectable <code class="literal">com.netflix.spectator.api.Registry</code> instance for you. Specifically, it configures a <code class="literal">ServoRegistry</code> 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 <code class="literal">MetricReader</code> instances and both will be shipped to the Atlas backend.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_spectator_counter" href="#_spectator_counter"></a>12.3.1&nbsp;Spectator Counter</h3></div></div></div><p>A counter is used to measure the rate at which some event is occurring.</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// create a counter with a name and a set of tags</span>
Counter counter = registry.counter(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"counterName"</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"tagKey1"</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"tagValue1"</span>, ...);
counter.increment(); <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// increment when an event occurs</span>
counter.increment(<span class="hl-number">10</span>); <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// increment by a discrete amount</span></pre><p>The counter records a single time-normalized statistic.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_spectator_timer" href="#_spectator_timer"></a>12.3.2&nbsp;Spectator Timer</h3></div></div></div><p>A timer is used to measure how long some event is taking. Spring Cloud automatically records timers for Spring MVC requests and conditionally <code class="literal">RestTemplate</code> requests, which can later be used to create dashboards for request related metrics like latency:</p><div class="figure"><a name="d0e3181" href="#d0e3181"></a><p class="title"><b>Figure&nbsp;12.1.&nbsp;Request Latency</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/RequestLatency.png" alt="RequestLatency"></div></div></div><br class="figure-break"><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// create a timer with a name and a set of tags</span>
counter.increment(<span class="hl-number">10</span>); <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// increment by a discrete amount</span></pre><p>The counter records a single time-normalized statistic.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_spectator_timer" href="#_spectator_timer"></a>12.3.2&nbsp;Spectator Timer</h3></div></div></div><p>A timer is used to measure how long some event is taking. Spring Cloud automatically records timers for Spring MVC requests and conditionally <code class="literal">RestTemplate</code> requests, which can later be used to create dashboards for request related metrics like latency:</p><div class="figure"><a name="d0e3201" href="#d0e3201"></a><p class="title"><b>Figure&nbsp;12.1.&nbsp;Request Latency</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/RequestLatency.png" alt="RequestLatency"></div></div></div><br class="figure-break"><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// create a timer with a name and a set of tags</span>
Timer timer = registry.timer(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"timerName"</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"tagKey1"</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"tagValue1"</span>, ...);
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// execute an operation and time it at the same time</span>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+22 -5
View File
@@ -1626,11 +1626,21 @@ Security. The assumption in this case is that the downstream services
might add these headers too, and we want the values from the proxy.
To not discard these well known security headers in case Spring Security is on the classpath you can set <literal>zuul.ignoreSecurityHeaders</literal> to <literal>false</literal>. This can be useful if you disabled the HTTP Security response headers in Spring Security and want the values provided by downstream services</simpara>
</section>
<section xml:id="_the_routes_endpoint">
<title>The Routes Endpoint</title>
<simpara>If you are using <literal>@EnableZuulProxy</literal> with tha Spring Boot Actuator you
will enable (by default) an additional endpoint, available via HTTP as
<literal>/routes</literal>. A GET to this endpoint will return a list of the mapped
<section xml:id="_management_endpoints">
<title>Management Endpoints</title>
<simpara>If you are using <literal>@EnableZuulProxy</literal> with the Spring Boot Actuator you
will enable (by default) two additional endpoints:</simpara>
<itemizedlist>
<listitem>
<simpara>Routes</simpara>
</listitem>
<listitem>
<simpara>Filters</simpara>
</listitem>
</itemizedlist>
<section xml:id="_routes_endpoint">
<title>Routes Endpoint</title>
<simpara>A GET to the routes endpoint at <literal>/routes</literal> will return a list of the mapped
routes:</simpara>
<formalpara>
<title>GET /routes</title>
@@ -1668,6 +1678,13 @@ service catalog, but the POST to /routes is a way to force the change
to happen immediately.</simpara>
</note>
</section>
<section xml:id="_filters_endpoint">
<title>Filters Endpoint</title>
<simpara>A GET to the filters endpoint at <literal>/filters</literal> 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.</simpara>
</section>
</section>
<section xml:id="_strangulation_patterns_and_local_forwards">
<title>Strangulation Patterns and Local Forwards</title>
<simpara>A common pattern when migrating an existing application or API is to