Distributed Queue Message Replication for High Availability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed systems, such as those used by online merchants, face challenges in maintaining high availability of queueing systems, leading to potential downtime and loss of sales due to dependencies between subsystems, particularly when the queueing system is offline.

Innovation Solution

Implementing a highly available distributed queue system using replicated messages, where a fleet of queue hosts and load balancers store message replicas across the system, allowing for efficient enqueue and dequeue operations, and enabling unseeded host discovery and queue state logging for recovery, ensuring fault tolerance and high availability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a queueing system is implemented in a distributed system, then task processing capability is improved, but system availability deteriorates when the queueing system goes offline

Engineering Contradiction:
Improvetask processing capabilityVSAvoidsystem availability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements message replication by creating and storing copies of queue messages across multiple queue hosts. When a message is enqueued, multiple replicas are distributed to different hosts in the fleet. This copying mechanism ensures that if one queue host fails, the messages and processing capability remain available on other hosts, thus maintaining system availability while preserving task processing capability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The queueing system is segmented into multiple independent queue hosts that can operate autonomously. Each host maintains its own queue data and can process messages independently. This segmentation allows the system to continue operating with partial capacity when some hosts are unavailable, preventing complete system downtime and maintaining availability.

Inventive Principle:
Principle #1Segmentation

2Reliability

If message replication is implemented across multiple queue hosts, then system availability is improved, but system complexity increases

Engineering Contradiction:
Improvesystem availabilityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The load balancer serves as an intermediary component that manages client connections and message routing to the fleet of queue hosts. It abstracts the complexity of message replication and host distribution from clients, providing a simple interface while handling the complex coordination of replicated messages across multiple hosts in the background.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

Queue hosts automatically discover and register themselves with the load balancer without requiring manual configuration or centralized management. The hosts self-manage their participation in the message replication system, dynamically joining and leaving the fleet while maintaining system functionality. This self-service approach reduces operational complexity despite the distributed architecture.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11442777B2Highly available distributed queue using replicated messages
Publication Date: 2022.09.13 AMAZON TECH INC
  • US11442777B2 patent drawing
  • US11442777B2 patent drawing
  • US11442777B2 patent drawing

AI summary

Methods and systems for implementing a highly available distributed queue using replicated messages are disclosed. An enqueue request is received from a client at a particular queue host of a plurality of queue hosts. The enqueue request comprises a message and a replica count greater than one. One or more copies of a replication request are sent from the particular queue host to one or more additional queue hosts. The replication request comprises the message. The quantity of copies of the replication request is determined based at least in part on the replica count. An initial replica of the message is enqueued at the particular queue host. One or more additional replicas of the message are enqueued at the one or more additional queue hosts. A quantity of the one or more additional replicas is determined based at least in part on the replica count.