SlideShare a Scribd company logo
1 of 39
.Net Resiliency
Framework - Polly
Ajay Jajoo – Senior Software Consultant
Akshit Kumar – Software Consultant
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
 Punctuality
Join the session 5 minutes prior to the session start time. We start on
time and conclude on time!
 Feedback
Make sure to submit a constructive feedback for all sessions as it is very
helpful for the presenter.
 Silent Mode
Keep your mobile devices in silent mode, feel free to move out of session
in case you need to attend an urgent call.
 Avoid Disturbance
Avoid unwanted chit chat during the session.
1. Introduction to Resiliency
2. Challenges in Distributed Systems
3. Introduction to Polly
4. Polly's Key Features
 Circuit Breaker pattern
 Retry pattern
 Timeout pattern
 Fallback pattern
5. Use cases
6. Best Practices
7. Demo
Definition: Resiliency in software development
refers to the ability of a system to withstand and
recover gracefully from failures, ensuring
continuous operation even when components fail.
Importance of Resiliency
In today's distributed and complex software architectures,
applications are prone to various challenges such as network
failures, service outages, and latency issues.
Building resilient applications is crucial to ensure reliability, user
satisfaction, and business continuity. So here, we will explore
Polly, a powerful .NET Resiliency Framework, and how it helps
developers address these challenges effectively.
Challenges in Distributed Systems
• Network Failures: In distributed systems, network failures are
common, leading to communication issues between services
and components.
• Service Outages: Services may go down due to
maintenance, updates, or unexpected issues, affecting the
overall application.
• Latency Issues: High latency can impact user experience,
especially in scenarios where real-time responsiveness is
crucial.
Addressing these challenges requires a resilient approach in
software design and implementation.
Introduction to Polly
What is Polly?
• Polly is an open-source .NET library that helps developers
implement resiliency patterns in their applications.
• It provides a set of policies for handling transient faults and
other resiliency concerns in a flexible and configurable
manner.
Polly as a .NET Resiliency framework
• Specifically designed for .NET applications, Polly integrates
seamlessly with various .NET frameworks and libraries.
• Polly allows developers to handle faults and build resilient
systems through well-established patterns.
Overview of Polly’s Features and Capabilities
Circuit Breaker Pattern: Prevents repeated calls to a failing operation, reducing the
impact of transient faults.
Retry Pattern: Enables automatic retries with customizable policies to handle
transient failures.
Timeout Pattern: Sets a maximum execution time for an operation, preventing it from
running indefinitely.
Fallback Pattern: Defines alternative actions to be taken when an operation fails,
ensuring graceful degradation.
With Polly, developers can enhance the robustness of their applications in the face of
various challenges.
Polly’s Key Features
Circuit Breaker Pattern:
• Polly implements the Circuit Breaker pattern to avoid repeated calls to a
failing operation.
• This pattern helps to reduce the impact of transient faults by temporarily
blocking the execution of the failing operation.
• Configurable parameters allow developers to fine-tune the behavior of
the Circuit Breaker.
Retry Pattern:
• Polly's Retry pattern enables automatic retries of operations in the
presence of transient failures.
• Developers can specify retry policies, including the number of retries,
delay between retries, and conditions triggering retries.
• This feature is essential for handling scenarios where temporary issues
may affect service availability.
Timeout Pattern:
• Polly provides the Timeout pattern to set a maximum execution time for
an operation.
• Prevents operations from running indefinitely, helping to manage system
resources effectively.
• Developers can define the maximum allowed duration for an operation.
Fallback Pattern:
• Polly's Fallback pattern allows developers to define alternative actions
when an operation fails.
• Ensures graceful degradation by providing a backup plan in case the
primary operation fails.
• Configurable fallback strategies for different scenarios.
Explanation of the Circuit Breaker Pattern
• The Circuit Breaker pattern prevents a system from repeatedly trying to
execute an operation that is likely to fail.
• It operates like an electrical circuit breaker, blocking the execution of a
faulty operation for a defined period.
• This helps in minimizing the impact of transient faults and allows the
system to recover.
How Polly implements the Circuit Breaker Pattern
• Polly provides a straightforward API for implementing the
Circuit Breaker pattern.
• Developers can configure the circuit breaker with parameters
such as failure threshold, duration of the open state, and
settings for resetting.
• Polly monitors the success and failure of operations and
dynamically adjusts the circuit state based on the configured
policies.
Benefits of Using the Circuit Breaker Pattern
• Improved system stability during periods of increased load or
service instability.
• Reduced resource consumption by avoiding unnecessary
retries on failing operations.
• Enhanced resilience by preventing cascading failures in
distributed systems.
Explanation of the Retry Pattern
• Purpose: Polly's Retry pattern is designed to handle transient
failures by automatically retrying a failed operation.
• Flexibility: Developers can customize retry policies based on
the specific needs of their application.
• Retrying Strategies: Polly supports various retry strategies,
including fixed retries, exponential backoff, and jittered retries.
How Polly Implements the Retry Pattern
• Policy Configuration: Developers can define the number of
retries, the duration between retries, and conditions triggering
retries.
• Automatic Retries: Polly intelligently manages retries, allowing
applications to recover from transient issues without manual
intervention.
• Exponential Backoff: Polly can be configured to use
exponential backoff strategies, reducing the frequency of
retries over time.
Use Cases for the Retry Pattern
• Network Transient Failures: Retry pattern is effective in
scenarios where network issues cause transient failures.
• Service Dependencies: Handling temporary unavailability of
external services through automatic retries.
• Resource Availability: Ensuring resource availability by
retrying operations that might initially fail.
Explanation of the Timeout Pattern
• Purpose: Polly's Timeout pattern helps prevent operations
from running indefinitely, ensuring timely responses.
• Importance: In distributed systems, unexpected delays can
occur; setting a maximum execution time is crucial for
resource management.
How Polly Helps in Handling Timeouts
• Configuration: Developers can set a maximum allowed
duration for an operation using Polly's timeout policy.
• Fail-Fast Approach: Polly ensures a fail-fast approach,
terminating operations that exceed the defined time limit.
• Resource Management: Timeout policies contribute to
effective resource utilization by avoiding prolonged execution
times.
Preventing Long-Running Operations
• Scenario: Long-running operations can impact system
responsiveness and resource availability.
• Benefits: Polly's Timeout pattern prevents operations from
tying up resources, contributing to the overall stability of the
system.
By incorporating Polly's Timeout pattern, developers can
proactively manage operation durations, enhance system
responsiveness, and improve the overall efficiency of their
applications.
Explanation of the Fallback Pattern
• Purpose: Polly's Fallback pattern allows developers to define
alternative actions when the primary operation fails.
• Graceful Degradation: Fallback strategies ensure graceful
degradation by providing a backup plan in case of failure.
• Enhanced Resilience: Applications can continue to function
with reduced functionality even when certain operations
encounter issues.
Implementing Fallback Strategies with Polly
• Configurable Fallbacks: Developers can configure specific
fallback actions to execute when the primary operation fails.
• Conditional Fallbacks: Polly enables the definition of
conditions under which fallback actions should be triggered.
• Example: For a web service call, a fallback could involve
returning cached data if the service is temporarily unavailable.
Ensuring Graceful Degradation
• Use Cases: Fallbacks are valuable in scenarios where the
failure of an operation does not necessarily mean the entire
system is compromised.
• User Experience: Fallback strategies contribute to maintaining
a positive user experience by handling failures transparently.
Polly's Fallback pattern provides a safety net for applications,
allowing them to gracefully handle failures and maintain a level
of functionality even under challenging conditions.
Benefits Observed
• Improved Uptime: Highlight instances where Polly contributed
to minimizing downtime and ensuring continuous service
availability.
• Enhanced User Satisfaction: Explore cases where the use of
Polly resulted in improved user satisfaction due to reduced
service disruptions.
• Operational Efficiency: Discuss how Polly positively affected
operational efficiency by automating resiliency measures.
Real World Examples
• Scalability Challenges
• Service Dependencies
• Dynamic Environments
Adoption Across Industries
• Finance
• Healthcare
• E-commerce
Customization Strategies
• Tailor Policies: Customize retry, timeout, and fallback policies
to align with application requirements.
• Dynamic Adjustments: Leverage Polly's dynamic policy
adjustments based on runtime conditions.
• Feedback Loops: Establish feedback loops for continuous
improvement, considering insights from monitoring
Scalability Considerations
• Scaling Policies: Adjust Polly policies to accommodate varying
levels of system load and demand.
• Parallelization: Explore parallelization strategies to enhance
performance during periods of increased traffic.
• Graceful Scaling: Ensure that Polly gracefully scales with
application growth without compromising resiliency.
Error Handling and Recovery
• Graceful Error Handling: Implement detailed error handling to
provide meaningful feedback to users and operators.
• Recovery Strategies: Define recovery strategies for scenarios
where Polly's resiliency measures are invoked.
• Fallback Optimization: Optimize fallback strategies to maintain
a seamless user experience during failures.
DoT NeT resiliency framework - Polly.pptx
DoT NeT resiliency framework - Polly.pptx

More Related Content

Similar to DoT NeT resiliency framework - Polly.pptx

SDLC Methodologies
SDLC MethodologiesSDLC Methodologies
SDLC MethodologiesSunil-QA
 
Software archiecture lecture06
Software archiecture   lecture06Software archiecture   lecture06
Software archiecture lecture06Luktalja
 
Step by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLCStep by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLCSunil-QA
 
Lecture3.se.pptx
Lecture3.se.pptxLecture3.se.pptx
Lecture3.se.pptxAmna Ch
 
Manage Infrastructure at Scale with Automation - June 2020
Manage Infrastructure at Scale with Automation - June 2020Manage Infrastructure at Scale with Automation - June 2020
Manage Infrastructure at Scale with Automation - June 2020Puppet
 
Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Lari Hotari
 
Process Model in Software Engineering.ppt
Process Model in Software Engineering.pptProcess Model in Software Engineering.ppt
Process Model in Software Engineering.pptAtharvaBavge
 
1221 raise expectations_for_the_ always_on_enterprise
1221 raise expectations_for_the_ always_on_enterprise1221 raise expectations_for_the_ always_on_enterprise
1221 raise expectations_for_the_ always_on_enterpriseScott Simmons
 
Software maintenance real world maintenance cost
Software maintenance real world maintenance costSoftware maintenance real world maintenance cost
Software maintenance real world maintenance costmalathieswaran29
 
Software process models
Software process modelsSoftware process models
Software process modelsMalik WaQas
 
Software process Models
Software process ModelsSoftware process Models
Software process ModelsSADEED AMEEN
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process ModelsNana Sarpong
 
Shorten Business Life Cycle Using DevOps
Shorten Business Life Cycle Using DevOpsShorten Business Life Cycle Using DevOps
Shorten Business Life Cycle Using DevOpsPerfecto Mobile
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackC4Media
 
Online hostel management_system
Online hostel management_systemOnline hostel management_system
Online hostel management_systemmd faruk
 

Similar to DoT NeT resiliency framework - Polly.pptx (20)

what-is-devops.ppt
what-is-devops.pptwhat-is-devops.ppt
what-is-devops.ppt
 
SDLC Methodologies
SDLC MethodologiesSDLC Methodologies
SDLC Methodologies
 
Software archiecture lecture06
Software archiecture   lecture06Software archiecture   lecture06
Software archiecture lecture06
 
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
 
Robotics
RoboticsRobotics
Robotics
 
Models.pptx
Models.pptxModels.pptx
Models.pptx
 
Step by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLCStep by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLC
 
Lecture3.se.pptx
Lecture3.se.pptxLecture3.se.pptx
Lecture3.se.pptx
 
Manage Infrastructure at Scale with Automation - June 2020
Manage Infrastructure at Scale with Automation - June 2020Manage Infrastructure at Scale with Automation - June 2020
Manage Infrastructure at Scale with Automation - June 2020
 
Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014
 
Process Model in Software Engineering.ppt
Process Model in Software Engineering.pptProcess Model in Software Engineering.ppt
Process Model in Software Engineering.ppt
 
1221 raise expectations_for_the_ always_on_enterprise
1221 raise expectations_for_the_ always_on_enterprise1221 raise expectations_for_the_ always_on_enterprise
1221 raise expectations_for_the_ always_on_enterprise
 
Software maintenance real world maintenance cost
Software maintenance real world maintenance costSoftware maintenance real world maintenance cost
Software maintenance real world maintenance cost
 
Software process models
Software process modelsSoftware process models
Software process models
 
Software process Models
Software process ModelsSoftware process Models
Software process Models
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
 
Shorten Business Life Cycle Using DevOps
Shorten Business Life Cycle Using DevOpsShorten Business Life Cycle Using DevOps
Shorten Business Life Cycle Using DevOps
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes Back
 
System Development Life Cycle Models
System Development Life Cycle ModelsSystem Development Life Cycle Models
System Development Life Cycle Models
 
Online hostel management_system
Online hostel management_systemOnline hostel management_system
Online hostel management_system
 

More from Knoldus Inc.

Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingKnoldus Inc.
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionKnoldus Inc.
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxKnoldus Inc.
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptxKnoldus Inc.
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfKnoldus Inc.
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxKnoldus Inc.
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingKnoldus Inc.
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesKnoldus Inc.
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxKnoldus Inc.
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxKnoldus Inc.
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxKnoldus Inc.
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxKnoldus Inc.
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxKnoldus Inc.
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationKnoldus Inc.
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationKnoldus Inc.
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II PresentationKnoldus Inc.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAKnoldus Inc.
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Knoldus Inc.
 

More from Knoldus Inc. (20)

Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)
 

Recently uploaded

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

DoT NeT resiliency framework - Polly.pptx

  • 1. .Net Resiliency Framework - Polly Ajay Jajoo – Senior Software Consultant Akshit Kumar – Software Consultant
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes  Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time!  Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter.  Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call.  Avoid Disturbance Avoid unwanted chit chat during the session.
  • 3. 1. Introduction to Resiliency 2. Challenges in Distributed Systems 3. Introduction to Polly 4. Polly's Key Features  Circuit Breaker pattern  Retry pattern  Timeout pattern  Fallback pattern 5. Use cases 6. Best Practices 7. Demo
  • 4. Definition: Resiliency in software development refers to the ability of a system to withstand and recover gracefully from failures, ensuring continuous operation even when components fail.
  • 5. Importance of Resiliency In today's distributed and complex software architectures, applications are prone to various challenges such as network failures, service outages, and latency issues. Building resilient applications is crucial to ensure reliability, user satisfaction, and business continuity. So here, we will explore Polly, a powerful .NET Resiliency Framework, and how it helps developers address these challenges effectively.
  • 6. Challenges in Distributed Systems • Network Failures: In distributed systems, network failures are common, leading to communication issues between services and components. • Service Outages: Services may go down due to maintenance, updates, or unexpected issues, affecting the overall application. • Latency Issues: High latency can impact user experience, especially in scenarios where real-time responsiveness is crucial. Addressing these challenges requires a resilient approach in software design and implementation.
  • 7. Introduction to Polly What is Polly? • Polly is an open-source .NET library that helps developers implement resiliency patterns in their applications. • It provides a set of policies for handling transient faults and other resiliency concerns in a flexible and configurable manner.
  • 8. Polly as a .NET Resiliency framework • Specifically designed for .NET applications, Polly integrates seamlessly with various .NET frameworks and libraries. • Polly allows developers to handle faults and build resilient systems through well-established patterns.
  • 9. Overview of Polly’s Features and Capabilities Circuit Breaker Pattern: Prevents repeated calls to a failing operation, reducing the impact of transient faults. Retry Pattern: Enables automatic retries with customizable policies to handle transient failures. Timeout Pattern: Sets a maximum execution time for an operation, preventing it from running indefinitely. Fallback Pattern: Defines alternative actions to be taken when an operation fails, ensuring graceful degradation. With Polly, developers can enhance the robustness of their applications in the face of various challenges.
  • 10. Polly’s Key Features Circuit Breaker Pattern: • Polly implements the Circuit Breaker pattern to avoid repeated calls to a failing operation. • This pattern helps to reduce the impact of transient faults by temporarily blocking the execution of the failing operation. • Configurable parameters allow developers to fine-tune the behavior of the Circuit Breaker.
  • 11. Retry Pattern: • Polly's Retry pattern enables automatic retries of operations in the presence of transient failures. • Developers can specify retry policies, including the number of retries, delay between retries, and conditions triggering retries. • This feature is essential for handling scenarios where temporary issues may affect service availability.
  • 12. Timeout Pattern: • Polly provides the Timeout pattern to set a maximum execution time for an operation. • Prevents operations from running indefinitely, helping to manage system resources effectively. • Developers can define the maximum allowed duration for an operation.
  • 13. Fallback Pattern: • Polly's Fallback pattern allows developers to define alternative actions when an operation fails. • Ensures graceful degradation by providing a backup plan in case the primary operation fails. • Configurable fallback strategies for different scenarios.
  • 14.
  • 15. Explanation of the Circuit Breaker Pattern • The Circuit Breaker pattern prevents a system from repeatedly trying to execute an operation that is likely to fail. • It operates like an electrical circuit breaker, blocking the execution of a faulty operation for a defined period. • This helps in minimizing the impact of transient faults and allows the system to recover.
  • 16. How Polly implements the Circuit Breaker Pattern • Polly provides a straightforward API for implementing the Circuit Breaker pattern. • Developers can configure the circuit breaker with parameters such as failure threshold, duration of the open state, and settings for resetting. • Polly monitors the success and failure of operations and dynamically adjusts the circuit state based on the configured policies.
  • 17. Benefits of Using the Circuit Breaker Pattern • Improved system stability during periods of increased load or service instability. • Reduced resource consumption by avoiding unnecessary retries on failing operations. • Enhanced resilience by preventing cascading failures in distributed systems.
  • 18.
  • 19. Explanation of the Retry Pattern • Purpose: Polly's Retry pattern is designed to handle transient failures by automatically retrying a failed operation. • Flexibility: Developers can customize retry policies based on the specific needs of their application. • Retrying Strategies: Polly supports various retry strategies, including fixed retries, exponential backoff, and jittered retries.
  • 20. How Polly Implements the Retry Pattern • Policy Configuration: Developers can define the number of retries, the duration between retries, and conditions triggering retries. • Automatic Retries: Polly intelligently manages retries, allowing applications to recover from transient issues without manual intervention. • Exponential Backoff: Polly can be configured to use exponential backoff strategies, reducing the frequency of retries over time.
  • 21. Use Cases for the Retry Pattern • Network Transient Failures: Retry pattern is effective in scenarios where network issues cause transient failures. • Service Dependencies: Handling temporary unavailability of external services through automatic retries. • Resource Availability: Ensuring resource availability by retrying operations that might initially fail.
  • 22.
  • 23. Explanation of the Timeout Pattern • Purpose: Polly's Timeout pattern helps prevent operations from running indefinitely, ensuring timely responses. • Importance: In distributed systems, unexpected delays can occur; setting a maximum execution time is crucial for resource management.
  • 24. How Polly Helps in Handling Timeouts • Configuration: Developers can set a maximum allowed duration for an operation using Polly's timeout policy. • Fail-Fast Approach: Polly ensures a fail-fast approach, terminating operations that exceed the defined time limit. • Resource Management: Timeout policies contribute to effective resource utilization by avoiding prolonged execution times.
  • 25. Preventing Long-Running Operations • Scenario: Long-running operations can impact system responsiveness and resource availability. • Benefits: Polly's Timeout pattern prevents operations from tying up resources, contributing to the overall stability of the system. By incorporating Polly's Timeout pattern, developers can proactively manage operation durations, enhance system responsiveness, and improve the overall efficiency of their applications.
  • 26.
  • 27. Explanation of the Fallback Pattern • Purpose: Polly's Fallback pattern allows developers to define alternative actions when the primary operation fails. • Graceful Degradation: Fallback strategies ensure graceful degradation by providing a backup plan in case of failure. • Enhanced Resilience: Applications can continue to function with reduced functionality even when certain operations encounter issues.
  • 28. Implementing Fallback Strategies with Polly • Configurable Fallbacks: Developers can configure specific fallback actions to execute when the primary operation fails. • Conditional Fallbacks: Polly enables the definition of conditions under which fallback actions should be triggered. • Example: For a web service call, a fallback could involve returning cached data if the service is temporarily unavailable.
  • 29. Ensuring Graceful Degradation • Use Cases: Fallbacks are valuable in scenarios where the failure of an operation does not necessarily mean the entire system is compromised. • User Experience: Fallback strategies contribute to maintaining a positive user experience by handling failures transparently. Polly's Fallback pattern provides a safety net for applications, allowing them to gracefully handle failures and maintain a level of functionality even under challenging conditions.
  • 30.
  • 31. Benefits Observed • Improved Uptime: Highlight instances where Polly contributed to minimizing downtime and ensuring continuous service availability. • Enhanced User Satisfaction: Explore cases where the use of Polly resulted in improved user satisfaction due to reduced service disruptions. • Operational Efficiency: Discuss how Polly positively affected operational efficiency by automating resiliency measures.
  • 32. Real World Examples • Scalability Challenges • Service Dependencies • Dynamic Environments
  • 33. Adoption Across Industries • Finance • Healthcare • E-commerce
  • 34.
  • 35. Customization Strategies • Tailor Policies: Customize retry, timeout, and fallback policies to align with application requirements. • Dynamic Adjustments: Leverage Polly's dynamic policy adjustments based on runtime conditions. • Feedback Loops: Establish feedback loops for continuous improvement, considering insights from monitoring
  • 36. Scalability Considerations • Scaling Policies: Adjust Polly policies to accommodate varying levels of system load and demand. • Parallelization: Explore parallelization strategies to enhance performance during periods of increased traffic. • Graceful Scaling: Ensure that Polly gracefully scales with application growth without compromising resiliency.
  • 37. Error Handling and Recovery • Graceful Error Handling: Implement detailed error handling to provide meaningful feedback to users and operators. • Recovery Strategies: Define recovery strategies for scenarios where Polly's resiliency measures are invoked. • Fallback Optimization: Optimize fallback strategies to maintain a seamless user experience during failures.