spring cloud star

26
#DevoxxF R Spring Cloud * Discovery and Configuration Systems Comparison by: Spencer Gibb https://github.com/spencergibb/spring-cloud-sta r http://spencer.gibb.us 1

Upload: spencer-gibb

Post on 21-Feb-2017

2.311 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Spring Cloud Star

#DevoxxFR

Spring Cloud *Discovery and Configuration

Systems Comparisonby: Spencer Gibb

https://github.com/spencergibb/spring-cloud-starhttp://spencer.gibb.us @spencerbgibb

1

Page 2: Spring Cloud Star

Salt Lake City, Utah

Page 3: Spring Cloud Star

#DevoxxFR

3

Page 4: Spring Cloud Star

#DevoxxFR

Spring Cloud Roadmap• Brixton RC2 Released: 22 April 2016

• Brixton GA Release: end of April (Maybe RC3)

• ‘Camden’ will follow Spring Boot 1.4: Q3 2016

• ‘Dalston’ will follow Spring 5 & Spring Boot 2.0: Q2 2017 (Java 8)

• Many Services Releases (SR) in between

4

Page 5: Spring Cloud Star

#DevoxxFR

Microservices

5

You must be this tall to ride

Page 6: Spring Cloud Star

#DevoxxFR

Service B

Service Registration & Discovery

6

Registry

Service A

Page 7: Spring Cloud Star

#DevoxxFR

DiscoveryClient• @EnableDiscoveryClient

• ServiceInstance si = discoveryClient.choose(“serviceId”)

• RestTemplate

• @FeignClient

7

Page 8: Spring Cloud Star

#DevoxxFR

Service B

12 Factor Appshttp://12factor.net

Distributed Configuration

8

ConfigServer

Service A

Page 9: Spring Cloud Star

#DevoxxFR

Service A

Context Lifecycle

9

BootstrapApplication

Context

Regular Application

ContextConfigServer

Page 10: Spring Cloud Star

#DevoxxFR

Environment

• @ConfigurationProperties• @Value• Environment

10

Page 11: Spring Cloud Star

#DevoxxFR

Spring Cloud Config Server

• Greenfield

• HTTP API similar to Netflix Config Server

• Backed by VCS: git, SVN

• Stateless

• @RefreshScope

• Plain text files (eg. messages_fr.properties)

11

Page 12: Spring Cloud Star

#DevoxxFR

Spring Cloud Config Server

• Uses spring-boot configuration files & semantics

• Auto-configured client

• Refresh via bus (events)

• Webhook support for github, gitlab and bitbucket

• Commercial Support in Pivotal Cloud Foundry 12

Page 13: Spring Cloud Star

#DevoxxFR

DEMO

13

Page 14: Spring Cloud Star

#DevoxxFR

Eureka

14

Page 15: Spring Cloud Star

#DevoxxFR

Eureka pro’s• Highly-available• Mature / Proven by Netflix• Tight Ribbon Integration• Commercial Support in Pivotal Cloud

Foundry

15

💚

Page 16: Spring Cloud Star

#DevoxxFR

Eureka Con’s• JVM Based

•Thick Java client

•Polyglot by Sidecar

•Built for AWS Initially

•Long thresholds for registraion and cache refresh (30s)

16

💔

Page 17: Spring Cloud Star

#DevoxxFR

Consul

17

Page 18: Spring Cloud Star

#DevoxxFR

Consul pro’s•Service Discovery & Configuration•Polyglot•HTTP API and DNS interface•ACL’s•Health Checks

18

💚

Page 19: Spring Cloud Star

#DevoxxFR

💚

•Multi-Datacenter•Vault Integration (Keys and Secrets)•YAML and Properties Blobs supported•peer-to-peer gossip system•Nice UI

Consul pro’s

19

Page 20: Spring Cloud Star

#DevoxxFR

Consul Con’s•Young•Agent on every host

20

💔

Page 21: Spring Cloud Star

#DevoxxFR

DEMO

21

Page 22: Spring Cloud Star

#DevoxxFR

Zookeeper

22

Page 23: Spring Cloud Star

#DevoxxFR

💚

Zookeeper pro’s•Consistent Store

•Started life as a Hadoop sub-project (2007?)

•Mature, used in many companies

•Useful if ZK is already part of your infrastructure

•Ephemeral Nodes / Persistent Connections

•Uses Apache Curator’s Service Discovery Recipe

23

Page 24: Spring Cloud Star

#DevoxxFR

💔

Zookeeper Con’s•Scale Issues•OPS Headaches•Needs management process like Netflix Exhibitor

•Persistent Connections24

Page 25: Spring Cloud Star

#DevoxxFR

Honorable Mention• HAProxy/Nginx/Apache HTTPD• Spring Cloud CloudFoundry• Spring Cloud ETCD (Experimental)• AirbNB Smart Stack

http://nerds.airbnb.com/smartstack-service-discovery-cloud/

• Uber HyperbahNhttps://youtu.be/N2472uS5Y6Mhttps://github.com/uber/hyperbahn

25

Page 26: Spring Cloud Star

#DevoxxFR

Questions?

26

Josh Long: The Bootiful Microservice13:55 Maillot

https://github.com/spencergibb/spring-cloud-star

http://spencer.gibb.us@spencerbgibb