These patterns ensure that a system can continue to function in the event of failures. Some common patterns include:
Retry Pattern: Automatically retry a failed operation a certain number of times before giving up. Useful when failures are transient.
Fallback Pattern: Provide a fallback behavior when an operation fails, such as returning a default value or an alternative service.
Timeout Pattern: Define a timeout for operations to prevent them from hanging indefinitely and consuming resources.
Bulkhead Pattern: Isolate components so that a failure in one doesn’t cascade to others. Think of it as partitioning the system.
Rate Limiting: Restrict the number of calls to a service within a certain time window to prevent overloading.
Circuit Breaker Pattern: Temporarily stop calls to a failing service to allow it time to recover.