The Retry pattern
Retrying is an approach that is increasingly needed in the context of distributed systems. Think about microservices or cloud-based infrastructures where components collaborate with each other but are not developed or deployed/operated by the same teams and parties.
In its daily operation, parts of a cloud-native application may experience what are called transient faults or failures, meaning some mini-issues that can look like bugs but are not due to your application itself; rather, they are due to some constraints outside of your control such as the networking or the external server/service performance. As a result, your application may malfunction (at least, that could be the perception of your users) or even hang in some places. The answer to the risk of such failures is to put in place some retry logic so that we pass through the issue by calling the service again, maybe immediately or after some wait time (such as a few seconds).