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

Resilient Microservices with AKS

Resilient Microservices with AKS

The slide deck of the presentation for Global Azure Bootcamp on 27th April 2019. The talk covers approaches to build resilient Microservices and deploying them to AKS. Along with code based approach with Polly, Istio Service Mesh is also covered during the session. Istio helps in adding features without making any code changes.

9e33a1d43a88f23f6c545c1e0f07f4b5?s=128

Nilesh Gule

April 27, 2019
Tweet

More Decks by Nilesh Gule

Other Decks in Technology

Transcript

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

    to the Singapore
  2. A BIG thank you to the 2019 Global Sponsors!

  3. None
  4. Autonomous work together

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

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

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

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

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

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

  13. None
  14. Recover from failure continue to function

  15. None
  16. handle transient failures

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

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

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

  20. Don’t wait forever

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

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

  24. Provide graceful degradation in event of failure

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

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

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

  29. repeated retries likely to fail

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

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

  32. @EnableHystrixDashboard @EnableCircuitBreaker

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

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

  35. None
  36. 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
  37. None
  38. None
  39. Thank you very much Code with Passion and Strive for

    Excellence https://github.com/NileshGule/ABC2019 https://www.slideshare.net/nileshgule/presentations https://speakerdeck.com/nileshgule/
  40. $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” }
  41. Q&A