The document discusses availability and introduces the Polly library. It defines availability as the probability a system works as required when required. It provides availability level tables and discusses how factors like reliability, maintenance and dependencies impact availability. It then introduces Polly as a .NET library that implements resilience patterns like retry, circuit breaker and fallback to make systems more robust and reliable when facing transient faults. It includes a demo of Polly and takes away that high availability increases user confidence and tools like Polly simplify fault handling.
6. AVAILABILITY
• Availability is the probability that a system will work as required when required during the
period of a mission.
• The mission could be the 18-hour span of an aircraft flight.The mission period could also be
the 3 to 15-month span of a military deployment.Availability includes non-operational periods
associated with reliability, maintenance, and logistics.
11. WHAT IS POLLY
• A .NET resilience and transient-fault-handling library.
• transient-fault:
– Something unexpected happened occasionally
• Ex. network peak or unstable let service unavailable.
• Ex. 3rd party API (there is no 100% availability)
• Ex.Access unmanaged resource (ex. Database, File)
12. WHY POLLY
• Using fluent API and thread safe way to implement Retry, Circuit breaker,Time out, Bulkhead
isolation and Fallback policy。
• Can implement multi fault handle in one place.
• Make system more robust.
• Focus on business logic rather than fault-handling.
15. FALLBACK
• Basic Concept:
– There is always a plan B
start
Execute
delegate
exception
Fallback
handle
Return result
Execute
fallback
delegate
end
Yes
Yes
No
No
16. FALLBACK (CONT.)
• Before we use Polly
• When you invoke something in catch that
might throw exception again, will you try
catch of that? Hummmm…
20. TAKEAWAY
• Things will go wrong, always prepare for the worst case
• High Availability make your user (or customer) more confidence
• Sharp tools make good work.
– Using policy wrap to make fault-handling more easy
– Use proper policy
25. READ MORE
• Making the Netflix API More Resilient
– https://netflixtechblog.com/making-the-netflix-api-more-resilient-a8ec62159c2d
• Circuit Breaker
– https://martinfowler.com/bliki/CircuitBreaker.html
• .NET Microservices Architecture
– https://dotnet.microsoft.com/download/e-book/microservices-architecture/pdf