DEV Community

Cover image for Reliability Patterns
Kenta Takeuchi
Kenta Takeuchi

Posted on • Originally published at bmf-tech.com

Reliability Patterns

This article was originally published on bmf-tech.com.

Overview

Summarizing reliability patterns based on those proposed by Azure, AWS, and GCP.

What is Reliability?

Reliability refers to the ability to continuously provide the functionality expected by users (systems or applications).

Characteristics Supporting Reliability

Reliability is supported by the following characteristics:

  • Availability: The system is available for use.
  • Durability: Data is not lost.
  • Fault Tolerance: The system continues to function even when a fault occurs.
  • Recoverability: The system returns to a normal state when a fault occurs.
    • Mechanisms for automatic system recovery and well-prepared runbooks, etc.
  • Predictability: The system's performance is predictable.
    • Monitoring and observability, etc.
  • Scalability: The system can scale out according to load.
  • Security: The system is secure.

Cloud Design Patterns Supporting Reliability

Here are some patterns related to reliability.

Ambassador Pattern

A pattern that delegates network communication processing to another service to reduce the load on the original service.

BFF (Backend for Frontend)

A pattern where a service dedicated to the frontend application is placed between the frontend application and backend services.

Bulkhead

A pattern that ensures other parts of the system are not affected even if one part fails.

Cache-Aside

A pattern that uses caching to avoid putting load on resources like databases or APIs.

cf. Cache Writing Methods

Circuit Breaker

A pattern that rejects requests for a certain period until a fault is resolved when a fault occurs.

It has three states: Closed, Half-Open, and Open.

Closed: Accepting requests
Half-Open: Accepting some requests
Open: Not accepting requests

Claim Check

A pattern that checks whether a request is legitimate before accepting it.

For example, instead of directly exchanging large payloads between services, save the payload to a database and exchange its ID.

Compensating Transaction

A pattern that restores resources to their original state if a transaction fails when updating multiple resources.

Competing Consumers (Work Queue)

A pattern where multiple consumers retrieve and process messages from the same messaging queue.

Referencing learn.microsoft.com - Competing Consumers Pattern. Although the name is unfamiliar, this is likely a simple messaging queue.

Event Sourcing

A pattern that records changes in system state as events, allowing the system state to be reconstructed.

Priority Queue

A pattern that assigns priorities to queues and processes higher-priority queues preferentially.

Pub/Sub

A pattern where publishers send messages and subscribers receive messages.

Publishers and subscribers exchange messages through topics.

References

Top comments (0)