1. What is transient fault?
Transient fault: I thought about how to translate this phrase for a while. It is also called an instant error. For example, a large number of projects now use WCF. If the connection times out due to transient network interruption or sudden increase in network load, in this case, the most direct way is to tell the customer that the submission failed. But this is not the result we really want. Because these errors are usually short-lived and recoverable, we only need to manually or automatically submit them again, retry again, you can submit the request normally. Another example is that in the SQL Server ha environment, although the high availability of SQL Server Enables automatic server switching and other security measures, the transaction commit exception caused by automatic server switching, we need to handle the exception by ourselves. If no exception is handled well, only crash or data is lost. ForHigh AvailabilityProgramThe retry logic should be implemented at the service call layer (WCF) and database access layer to process the transient fault.
2. Patterns & Framework
Because I am not a good guy, I naturally ask Google to find two available frameworks.
1. SQL fault retry provider
This project provides an example of how to create a high-availability application, especially in the SQL indexing environment. And provides a retry operation.DATA provider.
2. Transient fault handling framework
This framework comes from Microsoft's Windows azure appfabric customer Advisory Team (CAT) team. This framework provides a reusable framework for processing retry logic in different scenarios of a program. Retry is required when you use SQL Azure, Windows azure storage (queues, blobs, tables), Windows azure service bus, and Windows azure caching service.