Sync docs from master to gh-pages

This commit is contained in:
Dave Syer
2014-12-07 15:01:07 +00:00
parent 6fcf99858b
commit 92b8f7078e

View File

@@ -437,6 +437,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<ul class="sectlevel2">
<li><a href="#config-first-bootstrap">Config First Bootstrap</a></li>
<li><a href="#eureka-first-bootstrap">Eureka First Bootstrap</a></li>
<li><a href="#config-client-fail-fast">Config Client Fail Fast</a></li>
<li><a href="#_environment_changes">Environment Changes</a></li>
<li><a href="#_refresh_scope">Refresh Scope</a></li>
<li><a href="#_encryption_and_decryption_2">Encryption and Decryption</a></li>
@@ -456,6 +457,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<ul class="sectlevel1">
<li><a href="#_service_discovery_eureka_clients">Service Discovery: Eureka Clients</a>
<ul class="sectlevel2">
<li><a href="#_registering_with_eureka">Registering with Eureka</a></li>
<li><a href="#_making_the_eureka_instance_id_unique">Making the Eureka Instance ID Unique</a></li>
<li><a href="#_using_the_discoveryclient">Using the DiscoveryClient</a></li>
<li><a href="#_alternatives_to_the_discoveryclient">Alternatives to the DiscoveryClient</a></li>
<li><a href="#_why_is_it_so_slow_to_register_a_service">Why is it so Slow to Register a Service?</a></li>
@@ -1045,6 +1048,16 @@ can change its co-ordinates, as long as Eureka is a fixed point.</p>
</div>
</div>
<div class="sect2">
<h3 id="config-client-fail-fast">Config Client Fail Fast</h3>
<div class="paragraph">
<p>In some cases, it may be desirable to fail startup of a service if
it cannot connect to the Config Server. If this is the desired
behavior, set the bootstrap configuration property
<code>spring.cloud.config.failFast=true</code> and the client will halt with
an Exception.</p>
</div>
</div>
<div class="sect2">
<h3 id="_environment_changes">Environment Changes</h3>
<div class="paragraph">
<p>The application will listen for an <code>EnvironmentChangedEvent</code> and react
@@ -1466,8 +1479,14 @@ Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).
<div class="paragraph">
<p>Service Discovery is one of the key tenets of a microservice based architecture. Trying to hand configure each client or some form of convention can be very difficult to do and can be very brittle. Eureka is the Netflix Service Discovery Server and Client. The server can be configured and deployed to be highly available, with each server replicating state about the registered services to the others.</p>
</div>
<div class="sect2">
<h3 id="_registering_with_eureka">Registering with Eureka</h3>
<div class="paragraph">
<p>When clients register with Eureka, they provide eureka with meta-data about themselves such as host and port, health indicator URL, home page etc. Eureka receives heartbeat messages from each instance belonging to a service. If the heartbeat fails over a configurable timetable, the instance is normally removed from Eureka.</p>
<p>When a client registers with Eureka, it provide meta-data about itself
such as host and port, health indicator URL, home page etc. Eureka
receives heartbeat messages from each instance belonging to a service.
If the heartbeat fails over a configurable timetable, the instance is
normally removed from the registry.</p>
</div>
<div class="paragraph">
<p>Example eureka client:</p>
@@ -1527,6 +1546,22 @@ ID, or VIP).</p>
<div class="paragraph">
<p>See <a href="http://github.com/{github-repo}/tree/{github-tag}/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBean.java">EurekaInstanceConfigBean</a> and <a href="http://github.com/{github-repo}/tree/{github-tag}/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java">EurekaClientConfigBean</a> for more details of the configurable options.</p>
</div>
</div>
<div class="sect2">
<h3 id="_making_the_eureka_instance_id_unique">Making the Eureka Instance ID Unique</h3>
<div class="paragraph">
<p>By default a eureka instance is registered with an ID that is equal to its host name (i.e. only one service per host). Using Spring Cloud you can override this by providing a unique identifier in <code>eureka.instance.metadataMap.instanceId</code>. For example:</p>
</div>
<div class="listingblock">
<div class="title">application.yml</div>
<div class="content">
<pre>eureka:
instance:
metadataMap:
instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}</pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_using_the_discoveryclient">Using the DiscoveryClient</h3>
<div class="paragraph">
@@ -1945,7 +1980,7 @@ for details on the properties available.</p>
@ComponentScan
@EnableAutoConfiguration
@EnableEurekaClient
public class Application extends FeignConfigurer {
public class Application extends FeignConfiguration {
@Bean
public StoreClient storeClient() {
//loadBalance plugs Feign into ribbon. feign() works without load balancing.
@@ -2759,7 +2794,7 @@ service or the "resource" service if you have one).</p>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2014-12-04 15:25:37 UTC
Last updated 2014-12-07 15:00:24 UTC
</div>
</div>
</body>