Microservice no fluff, the REAL stuff

2,181 views

Published on

Slides from my presentation on microservices, spring cloud oss, service registry, zuul, hystrix. We also discuss various flavours of service registry for instance when zookeeper, eureka, consul. Then we took a first look on zuul and its key components, hystrix, hystrix dashboard, all accompanied with a demo hosted on github.

Published in: Technology

Microservice no fluff, the REAL stuff

  1. 1. @nklmish Microservice
 No fluff, the REAL stuff The best preparation for tomorrow is doing your best today @nklmish
  2. 2. @nklmish Agenda Common Problems Microservice - core concepts Pros & Cons Code
  3. 3. @nklmish About me Senior Software developer at 4FinanceIT Consultant and architect around JVM technology
  4. 4. @nklmish Monolithic ?
  5. 5. @nklmish Common Problems
  6. 6. @nklmish Too much complexity needs to be exposed
  7. 7. @nklmish legacy components - Hard to upgrade
  8. 8. @nklmish Workaround
  9. 9. @nklmish New functionality can just pop
  10. 10. @nklmish Easy to maintain standards, 
 hard to maintain quality
  11. 11. @nklmish Easy to maintain quality, 
 hard to maintain standards
  12. 12. @nklmish Refactoring (Before)
  13. 13. @nklmish Refactoring (After)
  14. 14. @nklmish Microservices
  15. 15. @nklmish Microservices 1 Application 2 3 4 5 6 7 8 9 N
  16. 16. @nklmish Core Concepts
  17. 17. @nklmish Concept 1 : Service Registry
  18. 18. @nklmish Service Registry Zookeeper Eureka Consul Consistency Partition Availability Partition Availability Partition
  19. 19. @nklmish Eureka Components: Server - REST service Client - Java component 
 (Used within a microservice)
  20. 20. @nklmish Eureka Client Server CommunicationClient Server Registration: first heartbeat (after 30s) Renew lease: heartbeat/30s Fetching Registry: retrieve & cache it locally Registry Update: /30s Shutdown: Cancel request on shutdown Renew failure: 
 No heartbeat for 90s, REMOVE Shutdown: 
 Removes instance from registry
  21. 21. @nklmish Concept 2 : Load balancing
  22. 22. @nklmish Ribbon Client side load balancer Built-in Failure resiliency Rule based load balancing
  23. 23. @nklmish Concept 3 : Edge Service
  24. 24. @nklmish Zuul Error RoutingPre Post Request Response
  25. 25. @nklmish Zuul features Load Shedding Authentication & Security Static Response handling Surgical Debug Filter Stress Testing
  26. 26. @nklmish Concept 4 : Failure management
  27. 27. @nklmish Hystrix Manage failures
 (latency + fault tolerance) Cascading failures Fail fast approach
  28. 28. @nklmish Pros & Cons
  29. 29. @nklmish Pros Component Richer tech stack Scalability Resilience
  30. 30. @nklmish Cons Distributed system. Arsenal of tools (Infrastructure) Testing Transactions
  31. 31. @nklmish DEMO
  32. 32. @nklmish Demo Spring Cloud OSS http://tiny.cc/micro- code
  33. 33. @nklmish Spring Cloud
  34. 34. @nklmish DEMO CATALOG SERVICE PRODUCT SERVICE PRICE SERVICE COMMENT SERVICE
  35. 35. @nklmish Microservice in REAL life
  36. 36. @nklmish Metrics
  37. 37. @nklmish Thank You Дякую Questions? http://tiny.cc/nklmish-micro

×