Cluster Sharding Framework for Leaderless Workload Balancing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Computing workloads are often unevenly distributed across cluster nodes, leading to performance issues and resource wastage due to overloaded or underutilized nodes, particularly in utility metering environments where message processing is involved.
Innovation Solution
A clustering framework that distributes workloads based on the identity of message destinations or senders using shard identifiers determined by hash functions, allowing nodes to self-govern and balance loads without a leader node, and utilizes a heartbeat service for node failure detection and reassignment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If workloads are distributed across cluster nodes without a coordination mechanism, then device complexity is reduced, but workload distribution becomes uneven causing some nodes to become overloaded while others remain underutilized
Solution Approach 1:
Each node autonomously determines its own workload assignments by computing hash values for incoming messages and independently claiming available shards without requiring coordination from other nodes or a central controller. This self-service approach eliminates complex inter-node communication while ensuring even workload distribution through deterministic hash-based assignment.
Solution Approach 2:
The workload is segmented into discrete shards that can be independently assigned to different nodes. Each shard is identified by a hash value computed from the message key, and nodes claim complete ownership of their assigned shards. This segmentation enables independent node operation while maintaining balanced workload distribution across the cluster.
2Device complexity
If nodes operate independently without failure detection, then device complexity is reduced, but cluster reliability decreases when nodes fail
Solution Approach 1:
Nodes periodically send heartbeat signals to report their operational status. When a node fails to respond to heartbeat requests within a specified time window, other nodes detect this feedback absence and automatically claim the failed node's shards. This simple feedback mechanism enables automatic failure detection and recovery without complex monitoring systems.
Solution Approach 2:
Surviving nodes autonomously detect node failures through heartbeat monitoring and automatically claim orphaned shards without requiring external intervention or complex coordination protocols. Each node independently monitors cluster health and responds to failures by claiming available workloads, maintaining continuous operation.
3Productivity
If a leader node coordinates workload distribution, then workload balance improves, but device complexity and single point of failure increase
Solution Approach 1:
Instead of a central leader coordinating workload assignment, each node independently computes hash values for incoming messages and claims available shards autonomously. This eliminates the single point of failure while maintaining efficient workload distribution through distributed self-service operations.
Solution Approach 2:
Workload coordination is segmented into independent node decisions rather than centralized control. Each node independently determines its own workload assignments based on hash computations, eliminating the need for leader node while maintaining balanced distribution through deterministic shard assignment.
4Device complexity
If nodes are statically assigned workloads, then device complexity is reduced, but adaptability to dynamic conditions and node failures decreases
Solution Approach 1:
Workload assignments are dynamically adjusted when nodes fail or join the cluster through the shard claiming mechanism. Nodes can claim orphaned shards from failed nodes or distribute new workloads as needed, allowing the system to adapt to changing conditions without complex reconfiguration procedures.
Solution Approach 2:
Nodes autonomously adapt to dynamic conditions by monitoring heartbeats and claiming available shards when failures occur or when workload distribution needs adjustment. This self-service adaptation enables the cluster to respond to changing conditions without external intervention or complex coordination.
Data Source
AI summary
Various embodiments disclose a method comprising obtaining, by a node in a cluster of nodes, a message from a messaging queue; determining, by the node, a shard within the cluster that corresponds to the message based upon an identifier included in the message; determining, by the node, a responsible node associated with the shard; and forwarding, by the node, the message to the responsible node, wherein the responsible node delivers the message to a destination.


