2016-02-04 microservices with spring cloud - utah arch meetup...next spring cloud sleuth 14 • via...
TRANSCRIPT
start
Microserviceswith Spring CloudSpencer Gibb, Pivotal
next2
Table of
Contents
01 Discovery
Spring Cloud DiscoveryClient
02 Configuration
Bootstrap Spring Environment
03 Netflix
Eureka
04 Consul
Discovery & Configuration
next
3
05 Zookeeper
Discovery & Configuration
next4
Registry
Service A
Service B
Service Registration & Discovery
next5
Registry
Service A
Service B
Service Registration & Discovery
next6
Registry
Service A
Service B
Service Registration & Discovery
next
DiscoveryClient
7
@EnableDiscoveryClient
ServiceInstance si = discoveryClient.choose(“serviceId”)
next8
ConfigServer
Service A Service
B
12 Factor Apps http://12factor.net
Distributed Configuration
Service A
next9
Bootstrap ApplicationContext
ConfigServer
Regular ApplicationContext
next
Environment
10
@ConfigurationProperties
@Value
next
Eureka
11
next
Consul
12
next
Zookeeper
13
next
Spring Cloud Sleuth
14
• Via Josh Long @starbuxman• Sleuth is a distributed tracing framework:
propagate correlation IDs across processes to understand request path
• Sleuth has traces (aggregate journey of a request) and Spans (each hop in journey from egress to ingress point)
• Sleuth Stream marshals captured Sleuth Spans over a Spring Cloud Stream binder (RabbitMQ, Kafka, etc.)
• Stream Zipkin takes marshaled Spans & writes to Zipkin DB for analysis
• Once you have instrumented nodes emitting Spans via Sleuth Stream to Zipkin Stream server, fire up https://github.com/openzipkin/zipkin/tree/master/zipkin-web