TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

3 pointsby acidity8 months ago
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?

no comments

no comments