Skip to content

Latest commit

 

History

History
307 lines (197 loc) · 5.19 KB

deploying-microservices-cf-summit-deckset.md

File metadata and controls

307 lines (197 loc) · 5.19 KB

slidenumbers: true

[fit] Deploying Microservices to

inline 70%


left

Me

Matt Stine @mstine Principal Software Engineer Pivotal [email protected]


right fit

I wrote a little cloud book...

FREE - Compliments of Pivotal

http://bit.ly/cloud-native-book

Attack the Pivotal booth to get a print copy!


Now that you have Cloud Foundry, what are you going to do with it?


[fit] If you're smart_, start with a_

[fit] MONOLITH_._


[fit] Make it 12 Factor


[fit] Eventually things get bigger...


inline fit

...and it becomes time to decompose.


[fit] Microservices?


Loosely coupled service oriented architecture with bounded contexts... -- Adrian Cockcroft


#You must be this tall to use Microservices

fit right

  • RAPID PROVISIONING
  • BASIC MONITORING
  • RAPID APPLICATION DEPLOYMENT
  • DEVOPS CULTURE

http://martinfowler.com/bliki/MicroservicePrerequisites.html


A Symbiotic Relationship

inline fit


Platform Features

  • Environment Provisioning
  • On-Demand Scaling
  • Failover/Resilience
  • Routing/Load Balancing
  • Data Service Operations (BOSH)
  • Monitoring

[fit] No Microservice

[fit] is an Island


Some Challenges of Distributed Systems

  • Configuration Management
  • Service Registration & Discovery
  • Routing & Load Balancing
  • Fault Tolerance
  • Monitoring

We need a representation of the composite system!


[fit] The BIG A App


---
memory: 512M
instances: 1
no-route: true
services:
  - cloudamqp-autoscale
applications:
- name: worker-process
  path: worker-process/build/libs/worker-process.jar
- name: producer-process
  path: producer/build/libs/producer.jar
- name: autoscaler-process
  path: autoscaler/build/libs/autoscaler.jar
- name: autoscale-monitor
  no-route: false
  host: autoscale-monitor-${random-word}
  path: monitor/build/libs/monitor.jar

^ The manifest is not sufficient...


[fit] Static

[fit] vs.

[fit] Dynamic


Like BOSH, but for microservices?


[fit] Decentralized

[fit] Autonomous

[fit] Capability

[fit] Teams / Services


You write it, you run it!



[fit] Spring Cloud

[fit] Distributed System Patterns FTW!


[fit] App_/_Service

[fit] Level

[fit] Patterns


[fit] Deploying/Running Apps

[fit] vs.

[fit] Composing Fault Tolerant Systems


Spring Cloud + Netflix OSS

  • Config Server / Cloud Bus
  • Eureka (Service Registry)
  • Ribbon (Load Balancer)
  • Hystrix (Circuit Breakers)
  • Zuul (Intelligent Routing)

Works on Lattice too!

inline

https://lattice.cf


Config Server

inline fit


Config Server + Cloud Bus

inline fit


[fit] DEMO


Eureka (Service Registry)

inline fit


[fit] DEMO

Ribbon (Load Balancer)

inline fit


Before cf_release v204

inline fit


cf_release v195

"CF_INSTANCE_INDEX"=>"0",
"CF_INSTANCE_IP"=>"1.2.3.4",
"CF_INSTANCE_PORT"=>"5678",
"CF_INSTANCE_ADDR"=>"1.2.3.4:5678",
"CF_INSTANCE_PORTS"=>[{external:80,internal:5678}]

cf_release v204

properties:
  dea_next:
    allow_host_access: true

After cf_release v204

inline fit


[fit] DEMO


Hystrix (Circuit Breaker)

inline fit


[fit] DEMO


Zuul (Intelligent Routing)

inline fit


[fit] DEMO


Spring Cloud FUTURES

  • Alternative Stacks (Consul, Zookeeper, etcd, JRugged, ...)
  • Distributed Request Tracing/Correlation (i.e. Dapper/Zipkin)
  • Stateful Patterns (Leader Election, Locks, State Machine)
  • Developer Workflow Improvements
  • Switches (Canaries, Feature Toggles, Surgical Routing, ...)
  • ???

Learn MOAR


THANK YOU