Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Resilient Microservices Architecture with Kubernetes

Resilient Microservices Architecture with Kubernetes

Slides from the Resilient Microservices Architecture with Kubernetes talk at VoxxedDays Singapore 2019 conference.

9e33a1d43a88f23f6c545c1e0f07f4b5?s=128

Nilesh Gule

May 30, 2019
Tweet

More Decks by Nilesh Gule

Other Decks in Technology

Transcript

  1. Resilient Microservices Architecture with Nilesh Gule @nileshgule | www.HandsOnArchitect.com

  2. None
  3. $whoami { “name” : “Nilesh Gule”, “website” : “https://www.HandsOnArchitect.com", “github”

    : “https://github.com/NileshGule" “twitter” : “@nileshgule”, “linkedin” : “https://www.linkedin.com/in/nileshgule”, “email” : “nileshgule@gmail.com", “likes” : “Technical Evangelism, Cricket” }
  4. None
  5. Autonomous work together

  6. https://samnewman.io/talks/principles-of-microservices/

  7. https://microservices.io/patterns/microservices.html

  8. https://github.com/dotnet-architecture/eShopOnContainers

  9. https://github.com/NileshGule/AKS-learning-series

  10. None
  11. Software infrastructure layer for controlling and monitoring internal, service-to- service

    traffic in Microservice application
  12. None
  13. No code changes

  14. None
  15. Recover from failure continue to function

  16. None
  17. handle transient failures

  18. https://docs.microsoft.com/en-sg/azure/architecture/patterns/retry

  19. .HandleTransientHttpError() .OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.NotFound) .WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2,

    retryAttempt))); .AddPolicyHandler(GetRetryPolicy());
  20. http://goupaz.com/docs/reference/config/traffic-rules/routing-rules.html#httpretry httpReqRetries: simpleRetry: attempts: 3 perTryTimeout: 2s

  21. Don’t wait forever

  22. None
  23. Policy timeoutPolicy = Policy.TimeoutAsync(30, TimeoutStrategy.Optimistic); await timeoutPolicy .ExecuteAsync(

  24. https://istio.io/docs/tasks/traffic-management/request-timeouts/ timeout: 0.5s

  25. Provide graceful degradation in event of failure

  26. None
  27. Don’t let one fault sink the whole ship

  28. https://docs.microsoft.com/en-sg/azure/architecture/patterns/bulkhead

  29. requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "1“

  30. repeated retries likely to fail

  31. https://docs.microsoft.com/en-sg/azure/architecture/patterns/circuit-breaker

  32. .CircuitBreakerAsync(5, TimeSpan.FromSeconds(30)); .AddPolicyHandler(GetCircuitBreakerPolicy()

  33. @EnableHystrixDashboard @EnableCircuitBreaker

  34. circuitBreaker: simpleCb: maxConnections: 100 httpMaxRequests: 1000 httpMaxRequestsPerConnection: 10 httpConsecutiveErrors: 7

    sleepWindow: 15m httpDetectionInterval: 5m Istio Cirtcuit Breaker
  35. https://developers.redhat.com/blog/2017/05/16/it-takes-more-than-a-circuit-breaker-to-create-a-resilient-application/

  36. None
  37. eShopOnContainers Resiliency Patterns 8 fallacies of Distributed Computing 12 factor

    apps Polly Istio Istio Service Mesh Hystrix patterns History of Service Mesh Rise of Service Mesh Architecture
  38. None
  39. None
  40. None
  41. None
  42. Thank you very much Code with Passion and Strive for

    Excellence https://github.com/NileshGule/AKS-learning-series https://github.com/NileshGule/eShopOnContainers https://gist.github.com/NileshGule/61492f039a390b62d9c088c1643884e2 https://www.slideshare.net/nileshgule/presentations https://speakerdeck.com/nileshgule/
  43. Feedback

  44. Q&A