Skip to main navigation Skip to search Skip to main content

Latency and cost-aware consumer group autoscaling in message broker systems

  • University of Porto

Research output: Contribution to journalArticleAcademicpeer-review

Abstract

Message brokers often facilitate communication between data producers and consumers by adding variable-sized messages to ordered distributed queues. Our goal is to determine the number of consumers and consumer partition assignments needed to ensure that the data consumption rate matches the data production rate. We model this problem as a variable item size bin packing problem. As the production rate varies, new consumer–partition assignments are computed, potentially requiring the reallocation of partitions from one consumer to another. During reallocation, data in the queue are not read, leading to increased latency costs. To address this problem, we focus on the multiobjective optimization cost of minimizing the number of consumers and reducing latency. We introduce several heuristic algorithms and compare them to state-of-the-art heuristics. In our experimental setup, the proposed modified worst fit (MWF) heuristic achieves a 48% reduction, with a similar number of consumers, in comparison with the best fit decrease (BFD). In addition, MWF achieves a 99th percentile latency of 2.24 seconds compared with that of 364.66 with the approach by Kafka using the same number of consumers. Alternatively, to obtain a lower 99th percentile latency than our approach does, Kafka requires at least 60% more consumers than our method requires.

Original languageEnglish
Article number105071
Number of pages13
JournalJournal of Parallel and Distributed Computing
Volume201
DOIs
Publication statusPublished - Jul 2025

Bibliographical note

Publisher Copyright:
© 2025 The Authors

Keywords

  • Bin packing
  • Consumer group autoscaling
  • Message broker
  • Variable item size

Fingerprint

Dive into the research topics of 'Latency and cost-aware consumer group autoscaling in message broker systems'. Together they form a unique fingerprint.

Cite this