Wednesday, July 13, 2016

Resiliency Patterns

I have gone through the excellent article on application resiliency

https://msdn.microsoft.com/en-us/library/dn600215.aspx

  • Circuit Breaker Pattern
Handle faults that may take a variable amount of time to rectify when connecting to a remote service or resource. This pattern can improve the stability and resiliency of an application.
  • Compensating Transaction Pattern
Undo the work performed by a series of steps, which together define an eventually consistent operation, if one or more of the operations fails. Operations that follow the eventual consistency model are commonly found in cloud-hosted applications that implement complex business processes and workflows.
  • Leader Election Pattern
Coordinate the actions performed by a collection of collaborating task instances in a distributed application by electing one instance as the leader that assumes responsibility for managing the other instances. This pattern can help to ensure that tasks do not conflict with each other, cause contention for shared resources, or inadvertently interfere with the work that other task instances are performing.
  • Retry Pattern
Enable an application to handle temporary failures when connecting to a service or network resource by transparently retrying the operation in the expectation that the failure is transient. This pattern can improve the stability of the application.
  • Scheduler Agent Supervisor Pattern
Coordinate a set of actions across a distributed set of services and other remote resources, attempt to transparently handle faults if any of these actions fail, or undo the effects of the work performed if the system cannot recover from a fault. This pattern can add resiliency to a distributed system by enabling it to recover and retry actions that fail due to transient exceptions, long-lasting faults, and process failures.

Spring application which uses netflix hystrix fault tolerance library to provide circuit breaker for a rest method

https://spring.io/guides/gs/circuit-breaker/