2016-02-04 microservices with spring cloud - utah arch meetup...next spring cloud sleuth 14 • via...

14
start Microservices with Spring Cloud Spencer Gibb, Pivotal

Upload: others

Post on 12-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

start

Microserviceswith Spring CloudSpencer Gibb, Pivotal

Page 2: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next2

Page 3: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

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

Page 4: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next4

Registry

Service A

Service B

Service Registration & Discovery

Page 5: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next5

Registry

Service A

Service B

Service Registration & Discovery

Page 6: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next6

Registry

Service A

Service B

Service Registration & Discovery

Page 7: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next

DiscoveryClient

7

@EnableDiscoveryClient

ServiceInstance si = discoveryClient.choose(“serviceId”)

Page 8: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next8

ConfigServer

Service A Service

B

12 Factor Apps http://12factor.net

Distributed Configuration

Page 9: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

Service A

next9

Bootstrap ApplicationContext

ConfigServer

Regular ApplicationContext

Page 10: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next

Environment

10

@ConfigurationProperties

@Value

Page 11: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next

Eureka

11

Page 12: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next

Consul

12

Page 13: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

next

Zookeeper

13

Page 14: 2016-02-04 Microservices with Spring Cloud - Utah Arch Meetup...next Spring Cloud Sleuth 14 • Via Josh Long @starbuxman • Sleuth is a distributed tracing framework: propagate correlation

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