question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changefeed - scale out support

See original GitHub issue

Is your feature request related to a problem? Please describe. Long running ChangeFeedIterator has no support for scale-out scenario, e.g. when data and nr. of partitions is growing, it’s not possible to split the FeedIterator when partition was split.

In our scenario, we create new container, iterate FeedRanges, and for each FeedRange, we create FeedIterator. So at the beginning we end up with very few FeedIterators. As the data grow to thousands of partitions, we still end up with the initial number of FeedIterators and no way to scale-out. And the processing is a bit CPU/IO heavy to process everything on one server.

Describe the solution you’d like Best case scenario would be notified, when the partition split happens, which FeedRange was split and what are the new FeedRanges. Or to be able to check if FeedRange represent multiple partitions with possibility to split it into multiple FeedRanges

Describe alternatives you’ve considered Changefeed processor. Not good for our use case. We need to be more in control how things are processed. e.g. more realtime processing, some ordering/dependency logic between partitions etc. And would require duplicating some of our infrastructure.

Additional context

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zbynek001commented, Oct 13, 2021

I didn’t mean, that it should be without any interruption. Of course, the FeedRange with the split will be interrupted to create new iterators. But other FeedRanges without a split should not be affected.

0reactions
ealsurcommented, Oct 13, 2021

In the case we expose a Scale API, it would require you to stop the iterator to handle and process the split. If you are running 1 iterator and want to check if after X iterations, it can be Scaled, you’d need to pass the current FeedRange / continuation, and hypothetically, the response would be the FeedRanges/continuations you can use after the split. So you would need to use maybe 1 of the results in the current machine to create a new iterator and rely the other results to other new instances.

I don’t see a way to make the process without interruptions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CosmosDB Change Feed Scaling - azure
If you are using Consumption Plan, if you are using App Service Plan, you can scale them yourself. That being said, the current...
Read more >
Working with the change feed - Azure Cosmos DB
Change feed support in Azure Cosmos DB works by listening to an Azure Cosmos DB container for any changes. It then outputs the...
Read more >
How to correctly manage horizontal scaling events in the ...
I am tracking my position in the feed by storing continuation tokens for each of the partition key ranges I am observing (I...
Read more >
Azure Cosmos DB change feed
The change feed is an Azure Cosmos DB feature that tracks changes to documents. ... As the service picks up changes from the...
Read more >
Lessons learned from an Azure Cosmos DB change feed ...
Change feed support in Azure Cosmos DB works by listening to an Azure Cosmos DB ... All of the items should only show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found