spring-cloud-netflix.adoc 1.87 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
= 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.

== 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 https://github.com/cfregly/fluxcapacitor/wiki/NetflixOSS-FAQ#eureka-service-discovery-load-balancer[flux capacitor] and https://groups.google.com/forum/?fromgroups#!topic/eureka_netflix/g3p2r7gHnN0[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