mirror of
https://github.com/spring-cloud/spring-cloud-netflix.git
synced 2026-09-24 04:09:00 +00:00
Sync docs from master to gh-pages
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
For example, <code class="literal">/</code> may be mapped to your web application, <code class="literal">/api/users</code> is mapped to the user service and <code class="literal">/api/shop</code> is mapped to the shop service.
|
||||
<a class="link" href="https://github.com/Netflix/zuul" target="_top">Zuul</a> is a JVM-based router and server-side load balancer from Netflix.</p><p><a class="link" href="http://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27" target="_top">Netflix uses Zuul</a> for the following:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Authentication</li><li class="listitem">Insights</li><li class="listitem">Stress Testing</li><li class="listitem">Canary Testing</li><li class="listitem">Dynamic Routing</li><li class="listitem">Service Migration</li><li class="listitem">Load Shedding</li><li class="listitem">Security</li><li class="listitem">Static Response handling</li><li class="listitem">Active/Active traffic management</li></ul></div><p>Zuul’s rule engine lets rules and filters be written in essentially any JVM language, with built-in support for Java and Groovy.</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 configuration property <code class="literal">zuul.max.host.connections</code> has been replaced by two new properties, <code class="literal">zuul.host.maxTotalConnections</code> and <code class="literal">zuul.host.maxPerRouteConnections</code>, which default to 200 and 20 respectively.</p></td></tr></table></div><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 default Hystrix isolation pattern (<code class="literal">ExecutionIsolationStrategy</code>) for all routes is <code class="literal">SEMAPHORE</code>.
|
||||
<code class="literal">zuul.ribbonIsolationStrategy</code> can be changed to <code class="literal">THREAD</code> if that isolation pattern is preferred.</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-starter" href="#netflix-zuul-starter"></a>8.1 How to Include Zuul</h2></div></div></div><p>To include Zuul in your project, use the starter with a group ID of <code class="literal">org.springframework.cloud</code> and a artifact ID of <code class="literal">spring-cloud-starter-netflix-zuul</code>.
|
||||
See the <a class="link" href="http://projects.spring.io/spring-cloud/" target="_top">Spring Cloud Project page</a> for details on setting up your build system with the current Spring Cloud Release Train.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-reverse-proxy" href="#netflix-zuul-reverse-proxy"></a>8.2 Embedded Zuul Reverse Proxy</h2></div></div></div><p>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more back end services.
|
||||
See the <a class="link" href="http://projects.spring.io/spring-cloud/" target="_top">Spring Cloud Project page</a> for details on setting up your build system with the current Spring Cloud Release Train.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-reverse-proxy" href="#netflix-zuul-reverse-proxy"></a>8.2 Embedded Zuul Reverse Proxy</h2></div></div></div><p>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more backend services.
|
||||
This feature is useful for a user interface to proxy to the backend services it requires, avoiding the need to manage CORS and authentication concerns independently for all the backends.</p><p>To enable it, annotate a Spring Boot main class with <code class="literal">@EnableZuulProxy</code>. Doing so causes local calls to be forwarded to the appropriate service.
|
||||
By convention, a service with an ID of <code class="literal">users</code> receives requests from the proxy located at <code class="literal">/users</code> (with the prefix stripped).
|
||||
The proxy uses Ribbon to locate an instance to which to forward through discovery.
|
||||
@@ -133,7 +133,7 @@ Even for routes that are part of your domain, try to think carefully about what
|
||||
</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>This is the default value for <code class="literal">sensitiveHeaders</code>, so you need not set it unless you want it to be different.
|
||||
This is new in Spring Cloud Netflix 1.1 (in 1.0, the user had no control over headers, and all cookies flowed in both directions).</p></td></tr></table></div><p>The <code class="literal">sensitiveHeaders</code> are a blacklist, and the default is not empty.
|
||||
Consequently, to make Zuul send all headers (except the <code class="literal">ignored</code> ones), you must explicitly set it to the empty list.
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your back end. The following example shows how to use <code class="literal">sensitiveHeaders</code>:</p><p><b>application.yml. </b>
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your backend. The following example shows how to use <code class="literal">sensitiveHeaders</code>:</p><p><b>application.yml. </b>
|
||||
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> zuul</span>:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> routes</span>:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> users</span>:
|
||||
|
||||
@@ -479,7 +479,7 @@ This bridge allows Spring Boot projects to use the normal configuration toolchai
|
||||
For example, <code class="literal">/</code> may be mapped to your web application, <code class="literal">/api/users</code> is mapped to the user service and <code class="literal">/api/shop</code> is mapped to the shop service.
|
||||
<a class="link" href="https://github.com/Netflix/zuul" target="_top">Zuul</a> is a JVM-based router and server-side load balancer from Netflix.</p><p><a class="link" href="http://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27" target="_top">Netflix uses Zuul</a> for the following:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Authentication</li><li class="listitem">Insights</li><li class="listitem">Stress Testing</li><li class="listitem">Canary Testing</li><li class="listitem">Dynamic Routing</li><li class="listitem">Service Migration</li><li class="listitem">Load Shedding</li><li class="listitem">Security</li><li class="listitem">Static Response handling</li><li class="listitem">Active/Active traffic management</li></ul></div><p>Zuul’s rule engine lets rules and filters be written in essentially any JVM language, with built-in support for Java and Groovy.</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 configuration property <code class="literal">zuul.max.host.connections</code> has been replaced by two new properties, <code class="literal">zuul.host.maxTotalConnections</code> and <code class="literal">zuul.host.maxPerRouteConnections</code>, which default to 200 and 20 respectively.</p></td></tr></table></div><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 default Hystrix isolation pattern (<code class="literal">ExecutionIsolationStrategy</code>) for all routes is <code class="literal">SEMAPHORE</code>.
|
||||
<code class="literal">zuul.ribbonIsolationStrategy</code> can be changed to <code class="literal">THREAD</code> if that isolation pattern is preferred.</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-starter" href="#netflix-zuul-starter"></a>8.1 How to Include Zuul</h2></div></div></div><p>To include Zuul in your project, use the starter with a group ID of <code class="literal">org.springframework.cloud</code> and a artifact ID of <code class="literal">spring-cloud-starter-netflix-zuul</code>.
|
||||
See the <a class="link" href="http://projects.spring.io/spring-cloud/" target="_top">Spring Cloud Project page</a> for details on setting up your build system with the current Spring Cloud Release Train.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-reverse-proxy" href="#netflix-zuul-reverse-proxy"></a>8.2 Embedded Zuul Reverse Proxy</h2></div></div></div><p>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more back end services.
|
||||
See the <a class="link" href="http://projects.spring.io/spring-cloud/" target="_top">Spring Cloud Project page</a> for details on setting up your build system with the current Spring Cloud Release Train.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="netflix-zuul-reverse-proxy" href="#netflix-zuul-reverse-proxy"></a>8.2 Embedded Zuul Reverse Proxy</h2></div></div></div><p>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more backend services.
|
||||
This feature is useful for a user interface to proxy to the backend services it requires, avoiding the need to manage CORS and authentication concerns independently for all the backends.</p><p>To enable it, annotate a Spring Boot main class with <code class="literal">@EnableZuulProxy</code>. Doing so causes local calls to be forwarded to the appropriate service.
|
||||
By convention, a service with an ID of <code class="literal">users</code> receives requests from the proxy located at <code class="literal">/users</code> (with the prefix stripped).
|
||||
The proxy uses Ribbon to locate an instance to which to forward through discovery.
|
||||
@@ -608,7 +608,7 @@ Even for routes that are part of your domain, try to think carefully about what
|
||||
</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>This is the default value for <code class="literal">sensitiveHeaders</code>, so you need not set it unless you want it to be different.
|
||||
This is new in Spring Cloud Netflix 1.1 (in 1.0, the user had no control over headers, and all cookies flowed in both directions).</p></td></tr></table></div><p>The <code class="literal">sensitiveHeaders</code> are a blacklist, and the default is not empty.
|
||||
Consequently, to make Zuul send all headers (except the <code class="literal">ignored</code> ones), you must explicitly set it to the empty list.
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your back end. The following example shows how to use <code class="literal">sensitiveHeaders</code>:</p><p><b>application.yml. </b>
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your backend. The following example shows how to use <code class="literal">sensitiveHeaders</code>:</p><p><b>application.yml. </b>
|
||||
</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> zuul</span>:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> routes</span>:
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> users</span>:
|
||||
|
||||
@@ -1036,7 +1036,7 @@ See the <link xl:href="http://projects.spring.io/spring-cloud/">Spring Cloud Pro
|
||||
</section>
|
||||
<section xml:id="netflix-zuul-reverse-proxy">
|
||||
<title>Embedded Zuul Reverse Proxy</title>
|
||||
<simpara>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more back end services.
|
||||
<simpara>Spring Cloud has created an embedded Zuul proxy to ease the development of a common use case where a UI application wants to make proxy calls to one or more backend services.
|
||||
This feature is useful for a user interface to proxy to the backend services it requires, avoiding the need to manage CORS and authentication concerns independently for all the backends.</simpara>
|
||||
<simpara>To enable it, annotate a Spring Boot main class with <literal>@EnableZuulProxy</literal>. Doing so causes local calls to be forwarded to the appropriate service.
|
||||
By convention, a service with an ID of <literal>users</literal> receives requests from the proxy located at <literal>/users</literal> (with the prefix stripped).
|
||||
@@ -1252,7 +1252,7 @@ This is new in Spring Cloud Netflix 1.1 (in 1.0, the user had no control over he
|
||||
</note>
|
||||
<simpara>The <literal>sensitiveHeaders</literal> are a blacklist, and the default is not empty.
|
||||
Consequently, to make Zuul send all headers (except the <literal>ignored</literal> ones), you must explicitly set it to the empty list.
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your back end. The following example shows how to use <literal>sensitiveHeaders</literal>:</simpara>
|
||||
Doing so is necessary if you want to pass cookie or authorization headers to your backend. The following example shows how to use <literal>sensitiveHeaders</literal>:</simpara>
|
||||
<formalpara>
|
||||
<title>application.yml</title>
|
||||
<para>
|
||||
|
||||
Reference in New Issue
Block a user