From 21a4e4534c19c0d37a429171bc780b117fe3e55c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 30 Sep 2014 11:07:48 +0100 Subject: [PATCH] Add user guide --- spring-cloud-netflix.html | 549 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 549 insertions(+) create mode 100644 spring-cloud-netflix.html diff --git a/spring-cloud-netflix.html b/spring-cloud-netflix.html new file mode 100644 index 000000000..2edcad179 --- /dev/null +++ b/spring-cloud-netflix.html @@ -0,0 +1,549 @@ + + + + + + + +Spring Cloud Netflix + + + + + +
+
+
+
+

This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration +and binding to the Spring Environment and other Spring programming model idioms. With a few +simple annotations you can quickly enable and configure the common patterns inside your +application and build large distributed systems with battle-tested Netflix components. The +patterns provided include Service Discovery (Eureka), Circuit Breaker (Hystrix), +Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).

+
+
+
+
+

Service Discovery: Eureka Clients

+
+
+

Example eureka client:

+
+
+
+
@Configuration
+@ComponentScan
+@EnableAutoConfiguration
+@EnableEurekaClient
+@RestController
+public class Application {
+
+	@RequestMapping("/")
+	public String home() {
+		return "Hello world";
+	}
+
+	public static void main(String[] args) {
+		new SpringApplicationBuilder(Application.class).web(true).run(args);
+	}
+
+}
+
+
+
+

(i.e. utterly normal Spring Boot app). Configuration is required to locate the Eureka server. Example:

+
+
+
+
eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8080/v2/
+      default.defaultZone: http://localhost:8080/v2/
+
+
+
+

The default application name, virtual host and non-secure port are taken from the Environment is +${spring.application.name}, ${spring.application.name}.mydomain.net and ${server.port} respectively.

+
+
+
+
+

Service Discovery: Eureka Server

+
+
+

Example eureka server:

+
+
+
+
@Configuration
+@EnableAutoConfiguration
+@EnableEurekaServer
+public class Application {
+
+	public static void main(String[] args) {
+		new SpringApplicationBuilder(Application.class).web(true).run(args);
+	}
+
+}
+
+
+
+

The server has a home page with a UI, and HTTP API endpoints per the +normal Eureka functionality under /v2/*.

+
+
+

Eureka (apache → tomcat) see flux capacitor and google group discussion.

+
+
+
+
+

Circuit Breaker: Hystrix Clients

+
+ +
+
+
+

Circuit Breaker: Hystrix Dashboard

+
+
+

Turbine

+ +
+
+
+
+

Declarative REST Client: Feign

+
+ +
+
+
+

Client Side Load Balancer: Ribbon

+
+ +
+
+
+

External Configuration: Archaius

+
+ +
+
+
+

Router and Filter: Zuul

+
+ +
+
+
+ + + \ No newline at end of file