Autoscaling Distributed Streaming Platform Partitions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed streaming platforms face limitations in scaling within consumer groups, leading to resource inefficiencies and downtime due to manual partition configuration and the inability to dynamically adjust partitions based on workload, resulting in bottlenecks and loss of message ordering.

Innovation Solution

An autoscaling mechanism that dynamically adjusts the number of partitions and consumer instances based on workload, allowing for scaling up or down to optimize resource usage and maintain message ordering, by triggering rebalancing phases and adding or removing partitions as needed.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the number of partitions is manually configured and fixed, then the system structure is simple, but the system cannot dynamically adapt to workload changes, causing resource inefficiency and performance bottlenecks

Engineering Contradiction:
Improvedynamic adaptability to workloadVSAvoidpartition management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic partition scaling where the number of partitions is no longer fixed but automatically adjusts based on consumer group size and workload conditions. The system transitions from static manual configuration to dynamic automatic adjustment, allowing partitions to be added or removed as consumers are added or removed, ensuring optimal resource utilization without manual intervention.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system performs self-service by automatically detecting when scaling conditions are met and executing partition scaling operations without external intervention. The streaming platform monitors consumer group changes and autonomously triggers partition addition or removal, eliminating the need for manual partition management and enabling the system to self-optimize based on actual workload conditions.

Inventive Principle:
Principle #25Self-service

2Productivity

If partitions are manually configured, then configuration is simple, but manual partition adjustment causes downtime and service interruption

Engineering Contradiction:
Improveservice continuityVSAvoidautomatic partition scaling
Core Design Contradiction:
ProductivityVSExtent of automation

Solution Approach 1:

The system performs preliminary actions by proactively adding partitions before consumers are fully removed, or removing partitions only after consumers have been added. This sequencing ensures that partition scaling operations do not coincide with consumer group changes that would cause rebalancing and downtime, maintaining continuous service availability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms by monitoring consumer group size and partition count, and only triggering partition scaling when specific conditions are met (e.g., consumer count exceeds partition count by a threshold, or consumer count drops below partition count by a threshold). This feedback-driven approach ensures scaling operations are performed only when necessary and safe, avoiding unnecessary disruptions.

Inventive Principle:
Principle #23Feedback

3Productivity

If the number of consumers exceeds the number of partitions, then consumer parallelism is limited, but adding partitions increases system complexity

Engineering Contradiction:
Improveconsumer parallelismVSAvoidpartition management overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system changes the partition count parameter dynamically based on the consumer group size parameter. When the consumer count exceeds the partition count (or exceeds it by a configured threshold), the system automatically increases the partition count to match or exceed the consumer count, enabling each consumer to work with its own partition and maximize parallelism without manual configuration.

Inventive Principle:
Principle #35Parameter changes

4Loss of energy

If partitions are removed to match reduced consumer count, then resource utilization is optimized, but message ordering may be lost during transitions

Engineering Contradiction:
Improveresource wastageVSAvoidmessage ordering guarantee
Core Design Contradiction:
Loss of energyVSReliability

Solution Approach 1:

The system applies preliminary anti-action by preventing partition removal until all consumers have been successfully added to the consumer group. This ensures that no consumer is left without a partition assignment, maintaining message ordering guarantees. The system only removes partitions after the consumer group has expanded to accommodate the original partition count, eliminating the risk of ordering loss during transitions.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS11962633B2Autoscaling a distributed streaming platform in an event-driven microservice architecture
Publication Date: 2024.04.16 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11962633B2 patent drawing
  • US11962633B2 patent drawing
  • US11962633B2 patent drawing

AI summary

A computer-implemented method and computer program product for autoscaling a streaming platform in an event-driven microservice architecture. Upon a new consumer being added to a consumer group, the streaming platform triggers a rebalance phase if the number of the consumers in the consumer group is less than the number of the partitions and assign a new partition if the number of the consumers in the consumer group is greater than the number of the partitions. Upon a consumer being removed from a consumer group, in response to determining that the number of partitions is greater than the number of consumers, the streaming platform stops message publishing to a partition that is consumed by the consumer, allows remaining messages in the partition to be consumed, and deletes the partition in response to determining that all the remaining messages are consumed.