You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What is the need for using unique Kafka Consumer Group for ingestion job? #646
Glad someone asked, we’ve patched this internally and I hadn’t thought to raise the question upstream yet.
Essentially we base the consumer group names on Source ID and the target Store name. It’s not quite a cherry-pick for me to bring it to an upstream PR because there’s one extra element specific to our use that probably is not generally appropriate, but it’s a small patch to extract if no one sees problems with the approach.
I think early on Feast Core didn't have the ability to ensure jobs are always running to ingest the FeatureSets applied.
That is, if a job is stopped, it won't be automatically restarted until the FeatureSet is reapplied again.
In such situation, it is possible that a job is stopped, then only after a "long" period of time it is started again (when the FeatureSet is reapplied).
For a FeatureSet with a high throughput Source, it is likely that during the period the job is stopped, the lag becomes incredibly high that if the job is to continue from the last offset it may not be able to keep up. Also, this very old data may have less value than the most recent one. But because the job cannot catch up, it cannot ingest fresh data as a result. That's why when a job is stopped, it is assigned a new consumer group id when started again so it will read from the latest offset in the Source.
However, now that Feast Core always ensures there are jobs running to ingest the FeatureSet applied, I think it makes sense for us to change the behaviour such that the same consumer group id is used when the job is stopped, and then automatically restarted by Feast Core. Because Feast
Core will very quickly attempt to restart the job, there will be no problem of the job not being able to catch up with the Source.
As a side note, currently if a running job is restarted via an update i.e. reapplying an existing FeatureSet with same the Source and Store but new features, the same consumer group id will be retained. (This is different from stopping a job and then applying the FeatureSet because the updated FeatureSet is applied when the job is still running). And I think currently it only works with DataflowRunner.
Activity
ches commentedon Apr 24, 2020
Glad someone asked, we’ve patched this internally and I hadn’t thought to raise the question upstream yet.
Essentially we base the consumer group names on
SourceID and the targetStorename. It’s not quite a cherry-pick for me to bring it to an upstream PR because there’s one extra element specific to our use that probably is not generally appropriate, but it’s a small patch to extract if no one sees problems with the approach.davidheryanto commentedon Apr 25, 2020
Thanks for bringing this up.
I think early on Feast Core didn't have the ability to ensure jobs are always running to ingest the FeatureSets applied.
That is, if a job is stopped, it won't be automatically restarted until the FeatureSet is reapplied again.
In such situation, it is possible that a job is stopped, then only after a "long" period of time it is started again (when the FeatureSet is reapplied).
For a FeatureSet with a high throughput Source, it is likely that during the period the job is stopped, the lag becomes incredibly high that if the job is to continue from the last offset it may not be able to keep up. Also, this very old data may have less value than the most recent one. But because the job cannot catch up, it cannot ingest fresh data as a result. That's why when a job is stopped, it is assigned a new consumer group id when started again so it will read from the latest offset in the Source.
However, now that Feast Core always ensures there are jobs running to ingest the FeatureSet applied, I think it makes sense for us to change the behaviour such that the same consumer group id is used when the job is stopped, and then automatically restarted by Feast Core. Because Feast
Core will very quickly attempt to restart the job, there will be no problem of the job not being able to catch up with the Source.
woop commentedon Jun 21, 2020
Closed due to #757 (comment)