Slide 1

Slide 1 text

Are your .NET 8 applications resilient… …for the chaos-proof?

Slide 2

Slide 2 text

SELÇUK USTA Sr. Engineering Manager /in/selcukusta selcukusta.com selcukusta ustasoglu selcukusta (at)gmail.com

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

AGENDA > Entire History of Chaos Engineering > Chaos Engineering Principles > Differentiates Chaos Testing From Chaos Engineering > Chaos Testing Practices on .NET 8 > Samples, Tips & Tricks

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

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.

Slide 8

Slide 8 text

CHAOS TESTING PRACTICES ON .NET 8

Slide 9

Slide 9 text

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)

Slide 10

Slide 10 text

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)

Slide 11

Slide 11 text

1 2

Slide 12

Slide 12 text

CHAOS IS EVERYWHERE! USE TELEMETRY!

Slide 13

Slide 13 text

TIPS TRICKS

Slide 14

Slide 14 text

when you don’t know what to do, use “AddStandardResilienceHandler()”* Tips and Tricks *https://github.com/dotnet/extensions/issues/5078#issuecomment-2046976122

Slide 15

Slide 15 text

Use common strategy options Tips and Tricks

Slide 16

Slide 16 text

Put your chaos policies innermost of the ResilliencePipeline Tips and Tricks

Slide 17

Slide 17 text

Don't just focus on HTTP requests, chaos is everywhere! Tips and Tricks

Slide 18

Slide 18 text

THANK YOU! /in/selcukusta selcukusta.com selcukusta ustasoglu selcukusta (at)gmail.com