TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to partition tenant data in queue for predictable performance?

3 点作者 acidity8 个月前
Hello HN,<p>We use PubSubLite but the same can be applied to any queue system. The events are then processed by service running in K8S.<p>I am looking for strategies&#x2F;patterns on how do folks partition their data so that each worker unit can get consistent performance with optimal CPU&#x2F;memory usage.<p>Our data is global and temporal i.e. different regions will have peak&#x2F;off peak data volume based on their time zones.<p>We have done performance test and we know how many events &#x2F; second &#x2F; partition we can process per worker units.<p>The issue we are currently facing is that when we get auto assigned partitions and based on randomness, we can get multiple heavy traffic partitions thus causing resource contention at a worker and causing slowdown.<p>Some options we have considered:<p>* running one worker unit per partition - this results in wastage as we have to use constant resources even in off peak time. this also results in using coordinater to make sure everybody is subscribing to correct partitions.<p>* group tenants into their traffic size and setup workers based on that. This has side effect of again extra maintenance on our side and bit of coordination with tenant provisioning&#x2F;deprovisioning.<p>* order traffic to certain partitions based on tenant_id but then some partitions become too big and others dont.<p>What other strategies you use?

暂无评论

暂无评论