2016-04-22 Spring Cloud Star Spring Cloud Star.pdf · 4/22/2016 · • Commercial Support in...
Transcript of 2016-04-22 Spring Cloud Star Spring Cloud Star.pdf · 4/22/2016 · • Commercial Support in...
#DevoxxFR
Spring Cloud *Discovery and Configuration
Systems Comparison by: Spencer Gibb
https://github.com/spencergibb/spring-cloud-starhttp://spencer.gibb.us @spencerbgibb
1
Salt Lake City, Utah
#DevoxxFR 3
#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
#DevoxxFR
Microservices
5
You must be this tall to ride
#DevoxxFR
Service B
Service Registration & Discovery
6
Registry
Service A
#DevoxxFR
DiscoveryClient
• @EnableDiscoveryClient
• ServiceInstance si = discoveryClient.choose(“serviceId”)
• RestTemplate
• @FeignClient
7
#DevoxxFR
Service B
12 Factor Apps http://12factor.net
Distributed Configuration
8
Config
Service A
#DevoxxFR
Service A
Context Lifecycle
9
BootstrapApplication
Context
Regular Application
ContextConfig
#DevoxxFR
Environment
• @ConfigurationProperties
• @Value
• Environment
10
#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
#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
#DevoxxFR
DEMO
13
#DevoxxFR
Eureka
14
#DevoxxFR
Eureka pro’s
• Highly-available
• Mature / Proven by Netflix
• Tight Ribbon Integration
• Commercial Support in Pivotal Cloud Foundry
15
💚
#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
💔
#DevoxxFR
Consul
17
#DevoxxFR
Consul pro’s
•Service Discovery & Configuration
•Polyglot
•HTTP API and DNS interface
•ACL’s
•Health Checks
18
💚
#DevoxxFR
💚
•Multi-Datacenter
•Vault Integration (Keys and Secrets)
•YAML and Properties Blobs supported
•peer-to-peer gossip system
•Nice UI
Consul pro’s
19
#DevoxxFR
Consul Con’s•Young
•Agent on every host
20
💔
#DevoxxFR
DEMO
21
#DevoxxFR
Zookeeper
22
#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
#DevoxxFR
💔
Zookeeper Con’s
•Scale Issues
•OPS Headaches
•Needs management process like Netflix Exhibitor
•Persistent Connections
24
#DevoxxFR
Honorable Mention• HAProxy/Nginx/Apache HTTPD
• Spring Cloud CloudFoundry
• Spring Cloud ETCD (Experimental)
• AirbNB Smart Stackhttp://nerds.airbnb.com/smartstack-service-discovery-cloud/
• Uber HyperbahNhttps://youtu.be/N2472uS5Y6M https://github.com/uber/hyperbahn
25
#DevoxxFR
Questions?
26
Josh Long: The Bootiful Microservice 13:55 Maillot
https://github.com/spencergibb/spring-cloud-star
http://spencer.gibb.us @spencerbgibb