{"id":2560,"date":"2018-06-28T00:00:00","date_gmt":"2018-06-28T00:00:00","guid":{"rendered":""},"modified":"2023-05-11T15:38:52","modified_gmt":"2023-05-11T22:38:52","slug":"using-the-retry-pattern-to-make-your-cloud-application-more-resilient","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/","title":{"rendered":"Using the Retry pattern to make your cloud application more resilient"},"content":{"rendered":"<p><em>This post was authored by <a href=\"https:\/\/mvp.microsoft.com\/en-us\/PublicProfile\/5002533\">Jason Haley, Microsoft Azure MVP<\/a>.<\/em><\/p>\n<p>Recently, I was at Boston Code Camp catching up with some old friends and looking to learn about containers or anything that could help me in my current project of migrating a microservices application to run in containers. I was speaking with one friend who had just presented a session on Polly, and he made a comment that got my attention. He said that one of the attendees at his session was under the impression that using the cloud would make his application inherently resilient and he would not need any of the features that Polly provides.<\/p>\n<p>In case you are not familiar with Polly, you can use this library to easily add common patterns like Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback to your code to make your system more resilient. Scott Hanselman recently wrote a blog post: <a href=\"https:\/\/www.hanselman.com\/blog\/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx\">Adding Resilience and Transient Fault handling to your .NET Core HttpClient with Polly<\/a>, discussing how he was using Polly and HttpClient with ASP.NET Core 2.1.<\/p>\n<p>What that attendee may have been referring to is that <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/best-practices\/retry-service-specific\">most Azure services and client SDKs<\/a> have features to perform retries for you (which can play a large part in making your application resilient), but in some cases you need to specifically set up the retry logic. Also keep in mind that your third-party client SDKs may need retry logic turned on in diverse ways. Your application will not automatically become resilient just by putting it in the cloud.<\/p>\n<h2>What is resiliency?<\/h2>\n<p>Resiliency is the capability to handle partial failures while continuing to execute and not crash. In modern application architectures \u2014 whether it be microservices running in containers on-premises or applications running in the cloud \u2014 failures are going to occur. For example, applications that communicate over networks (like services talking to a database or an API) are subject to transient failures. These temporary faults cause lesser amounts of downtime due to timeouts, overloaded resources, networking hiccups, and other problems that come and go and are hard to reproduce. These failures are usually self-correcting.<\/p>\n<p>You can\u2019t avoid failures, but you can respond in ways that will keep your system up or at least minimize downtime. For example, when one microservice fails, its effects can cause the system to fail.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"Block diagram showing system impact due to a failed microservice\" height=\"218\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\" title=\"System impact due to a failed microservice\" width=\"640\"><\/p>\n<p>With modern application design moving away from the monolithic application toward microservices, resiliency becomes even more important due to the increased number of components that need to communicate with each other.<\/p>\n<h2>How can you make your system more resilient?<\/h2>\n<p>Lately I\u2019ve been reading another great resource, the <a href=\"https:\/\/aka.ms\/microservicesebook\">.NET Microservices: Architecture for Containerized .NET Applications<\/a> e-book, which also has a reference microservice application on GitHub called <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\">eShopOnContainers<\/a>. Written in .NET Core 2.1, eShopOnContainers is a microservices architecture that uses Docker containers. I\u2019ll be referring to the reference application for sample code. Keep in mind, there are some new technologies that promise to help make service-to-service communication more resilient without adding code, like a <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/microservices\/interservice-communication#using-a-service-mesh\">service mesh<\/a>, which I won\u2019t be discussing here. I want to look at what type patterns we can use in code. Let\u2019s look at examples of a couple of resiliency patterns: <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/retry\">Retry<\/a> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/circuit-breaker\">Circuit Breaker<\/a>. The <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/\">Azure Architecture Center<\/a> covers several <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/category\/resiliency\">resiliency patterns<\/a> that you can use in your application.<\/p>\n<h3>Retry<\/h3>\n<p>Retries can be an effective way to handle transient failures that occur with cross-component communication in a system. As I mentioned, most Azure services and client SDKs have features for performing retries. One example when working with a database is to use Entity Framework Core and <b>EnableRetryOnFailure<\/b> to configure a retry strategy. In the eShopOnContainers code, you can see an example of this by looking at the <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\/blob\/dev\/src\/Services\/Catalog\/Catalog.API\/Startup.cs\">Startup.cs<\/a> file in the Catalog.API project. In the AddCustomDbContext method of the CustomExtensionsMethods utility class towards the bottom where it configures CatalogContext, you\u2019ll see the usage of <b>EnableRetryOnFailure<\/b>.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Code sample: AddCustomDbContext method from Startup.cs\" height=\"254\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/ea198cdf-25c5-4526-9154-707c393e50f1.webp\" title=\"AddCustomDbContext method from Startup.cs\" width=\"827\"><\/p>\n<p>The code above shows Entity Framework Core is to retry database calls up to 10 times before failing and to add some time delay between retries \u2014 but not delay more than 30 seconds. This is using the default execution strategy (there are others). If you want to know more about configuring Entity Framework Core to automatically retry failed database calls, you can find the details at <a href=\"https:\/\/docs.microsoft.com\/en-us\/ef\/core\/miscellaneous\/connection-resiliency\">Connection Resiliency<\/a>.<\/p>\n<h3>Circuit Breaker<\/h3>\n<p>Developers often use the Circuit Breaker and Retry patterns together to give retrying a break. Retry tries an operation again, but when it doesn\u2019t succeed, you don\u2019t always want to just try it one more time or you may risk prolonging the problem (especially if the failure is due to a service being under a heavy load). The Circuit Breaker pattern effectively shuts down all retries on an operation after a set number of retries have failed. This allows the system to recover from failed retries after hitting a known limit and gives it a chance to react in another way, like falling back to a cached value or returning a message to the user to try again later.<\/p>\n<p>Earlier this year when I read the <a href=\"https:\/\/aka.ms\/microservicesebook\">.NET Microservices: Architecture for Containerized .NET Applications<\/a> e-book, I found the especially useful HttpClient wrapping class named <b>ResilientHttpClient<\/b> in the chapter on resiliency. This utility class was <i>the reason<\/i> that I cloned the GitHub repo and started learning the eShopContainers code. Following the codebase update to use .NET Core 2.1, refactoring removed that utility class in favor of using new features that do the same thing. But if you are curious or are not using .NET Core 2.1 yet, you can find the code in <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\/blob\/master\/src\/BuildingBlocks\/Resilience\/Resilience.Http\/ResilientHttpClient.cs\">ResilientHttpClient.cs<\/a> on GitHub. The HttpInvoker method is the heart of this utility.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Code sample: HttpInvoker method from ResilientHttpClient.cs\" height=\"242\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b1a658d6-995e-4883-a5f7-6ceebcb55bba.webp\" title=\"HttpInvoker method from ResilientHttpClient.cs\" width=\"642\"><\/p>\n<p>This method uses Polly to make a call using an HttpClient <b>with an exponential back-off Retry policy and a Circuit Breaker policy<\/b> that will cause retries to stop for a minute after hitting a specified number of failed retries. The last line in the method is the one that makes the call by executing the passing in action. This may not make a lot of sense just from the small code snippet, but Section 8 of the e-book, <em>Implementing Resilient Applications<\/em>, goes into detail on how the ResilientHttpClient utility class works. The polices are in the CreateResilientHttpClient method of the ResilientHttpClientFactory class:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Code Sample: ResilientHttpClientFactory class from .NET Microservices: Architecture for Containerized .NET Applications\" height=\"718\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/8c1718e0-d218-4fd7-940f-48d847b15060.webp\" title=\"ResilientHttpClientFactory class from .NET Microservices: Architecture for Containerized .NET Applications\" width=\"602\"><\/p>\n<p>You should be able to understand what the policies are, but again I refer you to the e-book for a detailed explanation. Also, if you are using .NET Core 2.1, the e-book\u2019s update has useful information on how to configure and use the new HTTPClientFactory to do the same thing.<\/p>\n<h2>Summary<\/h2>\n<p>Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide. When you need retry logic added to your system, you should use a library such as Polly to speed up your implementation. Or, if you are exploring how to add resiliency without code, you should investigate service mesh products like <a href=\"https:\/\/istio.io\/\">Istio<\/a> and <a href=\"https:\/\/linkerd.io\/\">Linkerd<\/a>.<\/p>\n<p>If you use HttpClient in your applications to call APIs, you should download the .<a href=\"https:\/\/aka.ms\/microservicesebook\">NET Microservices: Architecture for Containerized .NET Applications<\/a> e-book and clone the <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\">GitHub repo<\/a>. The e-book discusses the reference architecture in depth to help you understand microservices architecture.<\/p>\n<p>There\u2019s also this recording of an Ignite 2017 breakout session about the e-book and eShopOnContainers project: <a href=\"https:\/\/channel9.msdn.com\/Events\/Ignite\/Microsoft-Ignite-Orlando-2017\/BRK3317\">Implement microservices patterns with .NET Core and Docker containers<\/a>.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1470],"tags":[],"audience":[3055,3056],"content-type":[],"product":[1625],"tech-community":[],"topic":[],"coauthors":[544],"class_list":["post-2560","post","type-post","status-publish","format-standard","hentry","category-containers","audience-developers","audience-it-implementors","product-container-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-28T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-11T22:38:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\" \/>\n<meta name=\"author\" content=\"Rob Caron\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rob Caron\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/rob-caron\/\",\"@type\":\"Person\",\"@name\":\"Rob Caron\"}],\"headline\":\"Using the Retry pattern to make your cloud application more resilient\",\"datePublished\":\"2018-06-28T00:00:00+00:00\",\"dateModified\":\"2023-05-11T22:38:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\"},\"wordCount\":1245,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\",\"articleSection\":[\"Containers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\",\"name\":\"Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\",\"datePublished\":\"2018-06-28T00:00:00+00:00\",\"dateModified\":\"2023-05-11T22:38:52+00:00\",\"description\":\"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Containers\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/containers\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using the Retry pattern to make your cloud application more resilient\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog","description":"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/","og_locale":"en_US","og_type":"article","og_title":"Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog","og_description":"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2018-06-28T00:00:00+00:00","article_modified_time":"2023-05-11T22:38:52+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp","type":"","width":"","height":""}],"author":"Rob Caron","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Rob Caron","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/rob-caron\/","@type":"Person","@name":"Rob Caron"}],"headline":"Using the Retry pattern to make your cloud application more resilient","datePublished":"2018-06-28T00:00:00+00:00","dateModified":"2023-05-11T22:38:52+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/"},"wordCount":1245,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp","articleSection":["Containers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/","name":"Using the Retry pattern to make your cloud application more resilient | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp","datePublished":"2018-06-28T00:00:00+00:00","dateModified":"2023-05-11T22:38:52+00:00","description":"Running your application in containers or in the cloud does not automatically make your application resilient. It\u2019s up to you to configure the features that will enable the retry logic you provide.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/06\/b01a151a-96ff-44b4-aa3a-ccee904c47d6.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-retry-pattern-to-make-your-cloud-application-more-resilient\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Containers","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/containers\/"},{"@type":"ListItem","position":3,"name":"Using the Retry pattern to make your cloud application more resilient"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/2560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=2560"}],"version-history":[{"count":0,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/2560\/revisions"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=2560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=2560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=2560"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=2560"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=2560"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=2560"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=2560"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=2560"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=2560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}