storm icon indicating copy to clipboard operation
storm copied to clipboard

[STORM-167] proposal for storm topology online update

Open jira-importer opened this issue 12 years ago • 16 comments

https://github.com/nathanmarz/storm/issues/540

Now update topology code can only be done by kill it and re-submit a new one. During the kill and re-submit process some request may delay or fail. It is not so good for online service. So we consider to add topology online update recently.

Mission

update running topology code gracefully one worker after another without service total interrupted. Just update topology code, not update topology DAG structure including component, stream and task number.

Proposal

  • client use "storm update topology-name new-jar-file" to submit new-jar-file update request
  • nimbus update stormdist dir, link topology-dir to new one
  • nimbus update topology version on zk
  • the supervisors that running this topology update it
    • check topology version on zk, if it is not the same as local version, a topology update begin
    • each supervisor schedule the topology's worker update at a rand(expect-max-update-time) time point
    • sync-supervisor download the latest code from nimbus
    • sync-process check local worker heartbeat version(to be added), if it is not the same with sync-supervisor downloaded version, kill the worker
    • sync-process restart killed worker
    • new worker heartbeat to zk with version(to be added), it can be displayed on web ui to check update progress.

This feature is deployed in our production clusters. It's really useful for topologys handling online request waiting for response. Topology jar can be updated without entire service offline.

We hope that this feature is useful for others too.


Originally reported by xumingming, imported from: proposal for storm topology online update
  • assignee: parth.brahmbhatt
  • status: Closed
  • priority: Minor
  • resolution: Abandoned
  • resolved: 2024-07-02T10:54:46+01:00
  • imported: 2025-01-24

jira-importer avatar Dec 15 '13 08:12 jira-importer

Subtasks:

  • STORM-1345
  • STORM-1346
  • STORM-1347

jira-importer avatar Dec 15 '13 08:12 jira-importer

az:

James Xu It sounds like you have implemented this - if so, is this story resolved?

I also would really like this feature, and was thinking of building it, but I won't if it is already done..

jira-importer avatar Jan 21 '14 13:01 jira-importer

xiaokang:

hi Aaron Zimmerman , I've submitted a pull request on the old storm git repo https://github.com/nathanmarz/storm/pull/741.

The core code modification is about 300 lines and many others are generated by thrift. We have deployed this feature on production clusters about 6 months. Any advice is welcome!

main points:

1. interface changes (compatible with old versions)
1.1 zk add :topology-version and :update-duration-sec fields to StormBase:status map
1.2 zk add :topology-version to executor heartbeat
1.3 worker local state add versions dir to storm worker's current running topology-version
1.4 nimbus add updateTopology interface
1.5 add topology-version field to storm.thrift three struct: TopologySummary ExecutorSummary TopologyInfo

2. topology update process
2.1 storm client run "storm jar xxxx -c topology.update=true" to invoke topology update process
2.2 storm client upload new jar file to nimbus
2.3 storm client call nimbus updateTopology interface
2.4 nimbus check the new topology and replace stormdist/storm-id dir
2.5 nimbus update StormBase in zk, set :topology-version(for destination version) and :update-duration-sec(for all workers update process duration) fields to StormBase:status map
2.6 supervisors check zk StormBase and do the update work if topology's local version is not the same with zk version
2.6.1 sync-supervisor download the latest code from nimbus to local stormdist/topology-version dir
2.6.2 each supervisor schedule the topology's worker update at a rand(expect-max-update-time) time point
2.6.3 sync-process check local worker version, if it is not the same with sync-supervisor downloaded version and update time point reached, set worker state to a new :update state
2.6.4 sync-process kill workers in :update state as normally
2.6.5 sync-process restart killed worker as normally, expect that read topology and conf from stormdist/topology-version dir
2.6.6 new worker heartbeat to zk with new topology-version, it can be displayed on web ui to check update progress

jira-importer avatar Jan 21 '14 16:01 jira-importer

danehammer:

I need this. There's already a lot of work done. What can I do to get this merged to master? Looks like some rebasing and correcting merge conflicts is in order, but what about approval of the design - is this how we want to do this?

jira-importer avatar Oct 07 '14 18:10 jira-importer

samuel hsieh:

Does this feature denote the 'storm swap' in the release plan introduced in the documentation?
https://storm.apache.org/documentation/Running-topologies-on-a-production-cluster.html

This topology rolling upgrade feature is important for streaming computing for real-life application, what support we can do for the feature/design approval? Thanks.

jira-importer avatar Mar 10 '15 10:03 jira-importer

soag:

Is there any news on this? Really would like to see this feature go into a release soon..

Thanks

jira-importer avatar Mar 19 '15 11:03 jira-importer

parth.brahmbhatt:

This is a useful feature and I see a lot of user interest.

Kang Xiao Thanks for the original patch and I am not sure why it was not reviewed. Do you think you can upmerge this with storm/master? If not, do you mind if I take over this task?

jira-importer avatar Mar 19 '15 18:03 jira-importer

parth.brahmbhatt:

This is a useful feature and I see a lot of user interest.

Kang Xiao Thanks for the original patch and I am not sure why it was not reviewed. Do you think you can upmerge this with storm/master? If not, do you mind if I take over this task?

jira-importer avatar Mar 19 '15 18:03 jira-importer

soag:

Hi Parth Brahmbhatt,

Just wondering if there is any update on this feature?

Thanks Roland

jira-importer avatar May 29 '15 09:05 jira-importer

parth.brahmbhatt:

Hey , I haven't had time to look into this yet and I am busy with some other stuff so probably wont get to it in next 2 months. If someone else wants to take it up please feel free to do so.

jira-importer avatar May 29 '15 16:05 jira-importer

samuel hsieh:

Hi Parth Brahmbhatt,
Is there any news on this? It's an important feature and may we raise the priority to higher?
or what support we can do for the feature/design approval?
Thanks.

jira-importer avatar Aug 10 '15 02:08 jira-importer

parth.brahmbhatt:

Sorry I have been busy wit some other stuff at work. Let me see if I can finish the work in coming 2 weeks.

jira-importer avatar Aug 10 '15 15:08 jira-importer

samuel hsieh:

Hi Parth Brahmbhatt,

Any validation support needed pls feel free to let us know and many thanks for your great contribution!!

jira-importer avatar Aug 14 '15 06:08 jira-importer

rzo1:

We are in the process of migrating our issue tracking system to GitHub issues. This issue has been stale for the last 5 years, and STORM has evolved with many dependency updates since this issue was last updated.

If the issue persists in the latest version of Storm, please feel free to reopen it or provide new context. Thank you very much!

jira-importer avatar Jul 02 '24 09:07 jira-importer

@rzo1 This feature is not available, must needed one. Please reopen it.

@Parth-Brahmbhatt please share your view on it

Gowtham-Gowts avatar Feb 13 '26 09:02 Gowtham-Gowts

@Gowtham-Gowts @Parth-Brahmbhatt Thanks for your interest in this very old issue. If you feel the need for this feature, feel free to come up with a PR or join the dev@ list for further discuss.

rzo1 avatar Feb 16 '26 15:02 rzo1