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

Are Your .NET 8 Applications Resilient for the Chaos-proof?

Are Your .NET 8 Applications Resilient for the Chaos-proof?

Selçuk Usta

May 25, 2024
Tweet

More Decks by Selçuk Usta

Other Decks in Programming

Transcript

  1. AGENDA > Entire History of Chaos Engineering > Chaos Engineering

    Principles > Differentiates Chaos Testing From Chaos Engineering > Chaos Testing Practices on .NET 8 > Samples, Tips & Tricks
  2. Entire History of Chaos Engineering “Chaos” Fundamentals Desktop accessories were

    developed by Apple in 1983 and by Ian James Marshall in 1992 that generated some random user/graphical interface events to control overall resilience. 1983 Three DVDless Days Netflix experienced a major database corruption and for three days could not ship DVDs to their members. Aug. 2008 Engineering Practices on “Chaos” “The best way to avoid failure is to fail constantly.” Netflix engineers built a tool is called the Chaos Monkey. The tool is to randomly kill instances and services within their architecture. Late 2010 Cloud Migration Journey Netflix has begun moving to move away from vertically scaled single points of failure, towards highly reliable, horizontally scalable, distributed systems in the cloud. Early 2009 1992 2003 & 2006 “Game Day” (by Amazon in 2003) and “DiRT” (by Google in 2006) were developed to increase reliability by regularly creating major failures.
  3. Chaos Engineering Principles Define "Stable" and "Robust" Error rates, throughputs,

    latency percentiles, response time percentiles, consumer groups, etc. “Real World” Events and Parameters Unexpected request payloads, network incidents, traffic peaks/bottoms, etc. Don't ignore environmental differences Chaos strongly prefers to experiment directly on production traffic. Run experiments on jungle. Automate failure for autonomous recovery Chaos certainly prefers to experiment unexpected behaviors at unexpected times. Run experiments automatically. Don't turn a blind eye to customer impact Some short-time negative impacts may be acceptable depending on business but, these should be minimized.
  4. Differentiates Chaos Testing From Chaos Engineering Target Chaos engineering aims

    to find potential problems before it happens. The goal of chaos testing is to validate system modules after they’ve been developed. Proactive vs. Reactive Chaos engineering aims to prevent disasters through controlled self-failures. Chaos testing expects things to go as planned. Jungle vs. Zoo Chaos engineering creates failures on the stage and identifies non-resilient points. Chaos testing checks and evaluates functions through predefined boundaries. Prevention vs Verification Chaos engineering aims to prevent failures in advance. Chaos testing verifies the modules through expectations.
  5. Resilience strategies (Polly components) (R)* Circuit Breaker (R) Retry (R)

    Fallback (R) Hedging (P)* Timeout (P) Rate Limiter (R)* Reactive Strategy (Handling failures, returning results, or executing callbacks by strategy specifications) (P)* Proactive Strategy (Making decisions to cancel/reject executions)
  6. Chaos strategies (Simmy components) (P)* Fault (P) Latency (P) Behavior

    (R)* Outcome (R)* Reactive Strategy (Handling failures, returning results, or executing callbacks by strategy specifications) (P)* Proactive Strategy (Making decisions to cancel/reject executions)
  7. 1 2

  8. when you don’t know what to do, use “AddStandardResilienceHandler()”* Tips

    and Tricks *https://github.com/dotnet/extensions/issues/5078#issuecomment-2046976122