$30 off During Our Annual Pro Sale. View Details »

Cloud Native Apps with Spring Cloud

Cloud Native Apps with Spring Cloud

Intro to Spring Cloud. Check the sample project used during the session:

https://github.com/snicoll-demos/spring-cloud-intro-conference

Stéphane Nicoll

January 13, 2016
Tweet

More Decks by Stéphane Nicoll

Other Decks in Programming

Transcript

  1. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under a

    Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
    Cloud Native Apps with

    Spring Cloud
    Stéphane Nicoll, Spring Boot committer, Pivotal Software inc.
    @snicoll

    View Slide

  2. https://github.com/snicoll
    @snicoll
    Stéphane Nicoll
    [email protected]

    View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. “Innovate and deliver faster

    than your competition

    View Slide

  8. Microservices?

    View Slide

  9. View Slide

  10. ! Distributed systems?
    ! Microservices?
    ! Cloud Native Apps?

    View Slide

  11. Monolith?

    View Slide

  12. “A global entity that handles state/
    failure scenarios
    “A smart application server,
    everything included
    “Easy to turn into a mess…

    View Slide

  13. ! Complex system
    ! Easy to work with
    ! Modularity comes from
    language / framework
    ! Inefficient scaling

    View Slide

  14. ! Long term commitment to
    technology
    ! intimidating to new developers
    ! obstacles to frequent releases

    View Slide

  15. Cloud native apps?

    View Slide

  16. “Smart agents that should know
    how to handle failures
    “Smart services, dumb pipes
    “Harder to do right…

    View Slide

  17. ! Simple system
    ! Harder to work with
    ! Modularity based on component
    services
    ! Scaling efficiently

    View Slide

  18. ! Easy to try new things
    ! Less intimidating
    ! Frequent deploys

    View Slide

  19. Spring Cloud

    View Slide

  20. View Slide

  21. SPRING CLOUD

    View Slide

  22. Example/Demo:

    Coffee app.

    View Slide

  23. Breaking

    the

    Monolith
    Store
    Customer
    Profile

    View Slide

  24. Customer

    name and

    location
    Customer

    View Slide

  25. List of stores

    with

    geo search
    Store

    View Slide

  26. Customer

    info and

    nearest stores
    Profile

    View Slide

  27. Now
    Separate apps
    Customer
    Profile
    Store

    View Slide

  28. Configuration

    management

    View Slide

  29. Config

    Server
    Config Server
    Git repository

    View Slide

  30. Finding
    Services
    ? ?

    View Slide

  31. Profile Eureka
    Customer Store
    Service
    Discovery

    Eureka

    View Slide

  32. Profile
    Customer
    #3
    Tied to

    single

    instance?
    Customer
    #2
    Customer
    #1

    View Slide

  33. Profile Eureka
    customer ?
    customer:

    - instance #1
    - instance #2
    - …

    View Slide

  34. Instance
    #3
    Client load
    balancing

    Ribbon
    Instance
    #2
    Instance
    #1
    Round robin,
    AWS zone affinity
    Ribbon

    View Slide

  35. service B
    Cascading
    Faults
    service A

    View Slide

  36. service B
    service A
    Circuit
    breaker

    Hystrix
    Fallback

    View Slide

  37. To the 

    cloud!

    View Slide

  38. ! Spring Cloud Bus w/ Config Server: push
    configuration changes automatically
    ! Turbine: gathers all relevant hystrix.stream in a
    unified turbine.stream
    ! Feign: declarative REST client
    ! Zuul: routing and filtering (e.g. for UI applications that
    want to proxy calls to one or more back end services)
    ! …
    If we had more time…

    View Slide

  39. ! Spring Cloud Sleuth: distributed tracing (HTrace,
    Zipkin)
    ! Spring Cloud Consul: Service discovery and
    configuration management using Hashicorp’s Consul
    ! Spring Cloud Zookeeper: Ditto using Apache
    Zookeeper
    If we had more time… (cont’d)

    View Slide

  40. Links
    ! https://cloud.spring.io
    ! https://start.spring.io
    ! https://spring.io/guides
    ! http://stackoverflow.com/tags/spring-cloud
    ! https://run.pivotal.io/
    ! https://pivotal.lanyrd.com/

    View Slide

  41. View Slide